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