We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44303df commit 277a149Copy full SHA for 277a149
lib/fs/node.js
@@ -67,7 +67,7 @@ FS.prototype.write = function write(filePath, buf) {
67
68
return this.mkdir(path.dirname(filePath))
69
.then(function() {
70
- return Promise.nfcall(this.fs.writeFile, that.path(filePath), buf);
+ return Promise.nfcall(that.fs.writeFile, that.path(filePath), buf);
71
});
72
};
73
@@ -86,6 +86,10 @@ FS.prototype.unlink = function unlink(filePath) {
86
* @return {Promise}
87
*/
88
FS.prototype.mkdir = function mkdir(filePath) {
89
+ if (this.fs.mkdirp) {
90
+ return Promise.nfcall(this.fs.mkdirp, this.path(filePath));
91
+ }
92
+
93
return Promise.nfcall(mkdirp, this.path(filePath), {
94
fs: this.fs
95
0 commit comments