Skip to content

Commit 24c4c05

Browse files
committed
fix: bind 'rename' to fs instance
1 parent 4f604fa commit 24c4c05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ module.exports = class FS {
2525
} else {
2626
this.superblockPromise = this._loadSuperblock();
2727
}
28-
// Needed so things don't break if you pass individual functions to `pify` etc
28+
// Needed so things don't break if you destructure fs and pass individual functions around
2929
this.readFile = this.readFile.bind(this)
3030
this.writeFile = this.writeFile.bind(this)
3131
this.unlink = this.unlink.bind(this)
3232
this.mkdir = this.mkdir.bind(this)
3333
this.rmdir = this.rmdir.bind(this)
3434
this.readdir = this.readdir.bind(this)
35+
this.rename = this.rename.bind(this)
3536
this.stat = this.stat.bind(this)
3637
this.lstat = this.lstat.bind(this)
3738
}

0 commit comments

Comments
 (0)