filehandle.read(buffer[, options])
buffer<Buffer> | <TypedArray> | <DataView> 一个将被填充读取的文件数据的缓冲区。options<Object>- 返回:<Promise> 成功时返回一个包含两个属性的对象:
bytesRead<integer> 读取的字节数buffer<Buffer> | <TypedArray> | <DataView> 对传入的buffer参数的引用。
从文件中读取数据,并将其存储在给定的缓冲区中。
【Reads data from the file and stores that in the given buffer.】
如果文件没有被同时修改,当读取的字节数为零时,就到达了文件末尾。
【If the file is not modified concurrently, the end-of-file is reached when the number of bytes read is zero.】