阿西河

所有教程

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

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js fs FileHandle 类

      Node.js fs FileHandle 类

      新增于: v10.0.0

      A FileHandle object is a wrapper for a numeric file descriptor. Instances of FileHandle are distinct from numeric file descriptors in that, if the FileHandle is not explicitly closed using the filehandle.close() method, they will automatically close the file descriptor and will emit a process warning, thereby helping to prevent memory leaks.

      Instances of the FileHandle object are created internally by the fsPromises.open() method.

      Unlike the callback-based API (fs.fstat(), fs.fchown(), fs.fchmod(), and so on), a numeric file descriptor is not used by the promise-based API. Instead, the promise-based API uses the FileHandle class in order to help avoid accidental leaking of unclosed file descriptors after a Promise is resolved or rejected.


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


      目录
      本文目录
      目录