bare-fs 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/promises.js CHANGED
@@ -51,6 +51,26 @@ class FileHandle extends EventEmitter {
51
51
  await fs.fchmod(this.fd, mode)
52
52
  }
53
53
 
54
+ async chown(uid, gid) {
55
+ await fs.fchown(this.fd, uid, gid)
56
+ }
57
+
58
+ async datasync() {
59
+ return fs.fdatasync(this.fd)
60
+ }
61
+
62
+ async sync() {
63
+ return fs.fsync(this.fd)
64
+ }
65
+
66
+ async truncate(len) {
67
+ await fs.ftruncate(this.fd, len)
68
+ }
69
+
70
+ async utimes(atime, mtime) {
71
+ await fs.futimes(this.fd, atime, mtime)
72
+ }
73
+
54
74
  createReadStream(opts) {
55
75
  return fs.createReadStream(null, { ...opts, fd: this.fd })
56
76
  }
@@ -71,11 +91,16 @@ exports.open = async function open(filepath, flags, mode) {
71
91
  exports.access = fs.access
72
92
  exports.appendFile = fs.appendFile
73
93
  exports.chmod = fs.chmod
94
+ exports.chown = fs.chown
74
95
  exports.constants = fs.constants
75
96
  exports.copyFile = fs.copyFile
76
97
  exports.cp = fs.cp
98
+ exports.lchown = fs.lchown
99
+ exports.lutimes = fs.lutimes
100
+ exports.link = fs.link
77
101
  exports.lstat = fs.lstat
78
102
  exports.mkdir = fs.mkdir
103
+ exports.mkdtemp = fs.mkdtemp
79
104
  exports.opendir = fs.opendir
80
105
  exports.readFile = fs.readFile
81
106
  exports.readdir = fs.readdir
@@ -85,6 +110,8 @@ exports.rename = fs.rename
85
110
  exports.rm = fs.rm
86
111
  exports.rmdir = fs.rmdir
87
112
  exports.stat = fs.stat
113
+ exports.statfs = fs.statfs
114
+ exports.truncate = fs.truncate
88
115
  exports.symlink = fs.symlink
89
116
  exports.unlink = fs.unlink
90
117
  exports.utimes = fs.utimes