- 任何指定的文件描述符都必须支持读取。
- 如果将文件描述符指定为
path
,则它将不会自动关闭。
- 读数将从当前位置开始。
例如,如果文件已经具有
'Hello World'
并且使用文件描述符读取了六个字节,则使用相同文件描述符对 fs.readFile()
的调用将得到 'World'
,而不是 'Hello World'
。
- Any specified file descriptor has to support reading.
- If a file descriptor is specified as the
path
, it will not be closed
automatically.
- The reading will begin at the current position. For example, if the file
already had
'Hello World
' and six bytes are read with the file descriptor,
the call to fs.readFile()
with the same file descriptor, would give
'World'
, rather than 'Hello World'
.
微信扫码登录