mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Implement PhantomJS's fs.makeTree method
This patch implements missing PhantomJS's fs.makeTree method.
This commit is contained in:
parent
939038bb08
commit
de9605a8b0
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user