copyDirSyncRecursive: Preserve timestamps for copied directories. #101
1 changed files with 4 additions and 0 deletions
|
|
@ -304,6 +304,10 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
|
||||||
fCopyFile(_path.join(sourceDir, files[i]), _path.join(newDirLocation, files[i]));
|
fCopyFile(_path.join(sourceDir, files[i]), _path.join(newDirLocation, files[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preserveTimestamps === true) {
|
||||||
|
fs.utimesSync(newDirLocation, checkDir.atime, checkDir.mtime);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* wrench.chmodSyncRecursive("directory", filemode);
|
/* wrench.chmodSyncRecursive("directory", filemode);
|
||||||
|
|
|
||||||
Reference in a new issue