Implement PhantomJS's fs.makeTree method

This patch implements missing PhantomJS's fs.makeTree method.
This commit is contained in:
Andrey Lushnikov 2017-05-13 12:42:56 -07:00
parent 939038bb08
commit de9605a8b0

View File

@ -106,6 +106,7 @@ class FileSystem {
/**
* @param {string} filePath
* @return {boolean}
*/
lastModified(filePath) {
return fs.statSync(filePath).mtime;
@ -113,6 +114,7 @@ class FileSystem {
/**
* @param {string} dirPath
* @return {boolean}
*/
makeDirectory(dirPath) {
try {
@ -123,6 +125,14 @@ class FileSystem {
}
}
/**
* @param {string} dirPath
* @return {boolean}
*/
makeTree(dirPath) {
return this.makeDirectory(dirPath);
}
/**
* @param {string} dirPath
*/