How to use the renameSync function from graceful-fs
Find comprehensive JavaScript graceful-fs.renameSync code examples handpicked from public code repositorys.
GitHub: canarddu38/DUCKSPLOIT
511 512 513 514 515 516 517 518 519 520 521 522
exports.realpath = Promise.promisify(fs.realpath); exports.realpathSync = fs.realpathSync; // rename exports.rename = Promise.promisify(fs.rename); exports.renameSync = fs.renameSync; // rmdir exports.rmdir = rmdir; exports.rmdirSync = rmdirSync;
9
48
0
+ 7 other calls in file
21 22 23 24 25 26 27 28 29 30
tryRenameSync() function tryRenameSync () { if (overwrite) { try { return fs.renameSync(src, dest) } catch (err) { if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') { removeSync(dest) options.overwrite = false // just overwriteed it, no need to do it again
0
1
0
218 219 220 221 222 223 224 225 226 227
fs.fsyncSync(fd) } fs.closeSync(fd) if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) if (options.mode) fs.chmodSync(tmpfile, options.mode) fs.renameSync(tmpfile, filename) removeOnExitHandler() } catch (err) { if (fd) { try {
0
0
0
+ 3 other calls in file
graceful-fs.promises is the most popular function in graceful-fs (1135 examples)