How to use the linkSync function from graceful-fs
Find comprehensive JavaScript graceful-fs.linkSync code examples handpicked from public code repositorys.
GitHub: canarddu38/DUCKSPLOIT
467 468 469 470 471 472 473 474 475 476 477 478
exports.fsync = Promise.promisify(fs.fsync); exports.fsyncSync = fs.fsyncSync; // link exports.link = Promise.promisify(fs.link); exports.linkSync = fs.linkSync; // listDir exports.listDir = listDir; exports.listDirSync = listDirSync;
9
48
0
+ 7 other calls in file
34 35 36 37 38 39 40 41 42 43
if (err.code !== 'EXDEV') throw err return moveSyncAcrossDevice(src, dest, overwrite) } } else { try { fs.linkSync(src, dest) return fs.unlinkSync(src) } catch (err) { if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { return moveSyncAcrossDevice(src, dest, overwrite)
0
1
0
46 47 48 49 50 51 52 53 54 55 56 57
throw err } const dir = path.dirname(dstpath) const dirExists = fs.existsSync(dir) if (dirExists) return fs.linkSync(srcpath, dstpath) mkdir.mkdirsSync(dir) return fs.linkSync(srcpath, dstpath) }
0
0
1
+ 11 other calls in file
graceful-fs.promises is the most popular function in graceful-fs (1135 examples)