How to use the closeAsync function from fs

Find comprehensive JavaScript fs.closeAsync code examples handpicked from public code repositorys.

11
12
13
14
15
16
17
18
19
20
21
      ioctl(dstFd, 0x40049409, srcFd)      
    } finally {
      await fs.closeAsync(dstFd)
    }
  } finally {
    await fs.closeAsync(srcFd)
  }
}


// btrfs clone, callback version
fork icon28
star icon63
watch icon0

+ 17 other calls in file

72
73
74
75
76
77
78
79
80
81
 */
_reopen() {
  let self = this

  this.bytesWritten = 0
  return fs.closeAsync(self.fd)
    .then(() => {
      self.closed = self.destroyed = false
      self.fd = null
    })
fork icon1
star icon1
watch icon0