阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js fs filehandle.read

      Node.js fs filehandle.read(buffer, offset, length, position)

      新增于: v10.0.0

      • buffer < Buffer> |
      • offset < integer>
      • length < integer>
      • position < integer>
      • Returns:

      Read data from the file.

      buffer is the buffer that the data will be written to.

      offset is the offset in the buffer to start writing at.

      length is an integer specifying the number of bytes to read.

      position is an argument specifying where to begin reading from in the file. If position is null, data will be read from the current file position, and the file position will be updated. If position is an integer, the file position will remain unchanged.

      Following successful read, the Promise is resolved with an object with a bytesRead property specifying the number of bytes read, and a buffer property that is a reference to the passed in buffer argument.


      更多内容请参考:Node.js fs 文件系统,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录