How to use the unlinkSync function from graceful-fs
Find comprehensive JavaScript graceful-fs.unlinkSync code examples handpicked from public code repositorys.
GitHub: canarddu38/DUCKSPLOIT
282 283 284 285 286 287 288 289 290
rmdirSync(childPath); } results.push(...removed); } else { fs.unlinkSync(childPath); results.push(currentPath); } }
9
48
0
+ 23 other calls in file
GitHub: rifanaldio/Admin-Analisa
67 68 69 70 71 72 73 74 75 76
stream.write('second write ' + i + '\n') }) setTimeout(function () { // Oops! Deleted the file! fs.unlinkSync(target) // write some more stuff. streams.forEach(function (stream, i) { stream.write('third write ' + i + '\n')
1
1
0
35 36 37 38 39 40 41 42 43 44
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
2256 2257 2258 2259 2260 2261 2262 2263 2264 2265
const socket = new net.Socket(); socket.on("error", (error) => { if (error.code === "ECONNREFUSED") { // No other server listening on this socket so it can be safely removed fs.unlinkSync(this.options.ipc); resolve(); return;
0
0
1
+ 6 other calls in file
GitHub: mmpyw01/software-studio
3212 3213 3214 3215 3216 3217 3218 3219 3220 3221
* @param {Error & { code?: string }} error */ (error) => { if (error.code === "ECONNREFUSED") { // No other server listening on this socket so it can be safely removed fs.unlinkSync(/** @type {string} */ (this.options.ipc)); resolve(); return;
0
0
1
+ 5 other calls in file
GitHub: mmpyw01/software-studio
239 240 241 242 243 244 245 246 247 248
} status.saved = true; } else if (!hasExternalSnapshots && jestExistsFile(this._snapshotPath)) { if (this._updateSnapshot === 'all') { fs.unlinkSync(this._snapshotPath); } status.deleted = true; }
0
0
1
GitHub: mmpyw01/software-studio
191 192 193 194 195 196 197 198 199 200
return false; } if (!fileExists(testPath, hasteFS)) { if (update === 'all') { fs.unlinkSync(snapshotFile); } return true; }
0
0
1
165 166 167 168 169 170 171 172 173 174
writeStream.__atomicClosed = true writeStream.emit('close') } function cleanupSync () { try { fs.unlinkSync(writeStream.__atomicTmp) } finally { return } }
0
0
0
6 7 8 9 10 11 12 13 14 15
var clobber = options.clobber var preserveTimestamps = options.preserveTimestamps if (fs.existsSync(destFile)) { if (clobber) { fs.unlinkSync(destFile) } else { var err = new Error('EEXIST: ' + destFile + ' already exists.') err.code = 'EEXIST' err.errno = -17
0
0
0
53 54 55 56 57 58 59 60 61 62 63
return mayCopyFile(srcStat, src, dest, opts) } function mayCopyFile (srcStat, src, dest, opts) { if (opts.overwrite) { fs.unlinkSync(dest) return copyFile(srcStat, src, dest, opts) } else if (opts.errorOnExist) { throw new Error(`'${dest}' already exists`) }
0
0
0
+ 5 other calls in file
34 35 36 37 38 39 40 41 42 43 44
} function cleanupOnExit (tmpfile) { return function () { try { fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile) } catch (_) {} } }
0
0
0
+ 3 other calls in file
GitHub: alanbabyjoseph/library
120 121 122 123 124 125 126 127 128
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) } catch (err) { try { fs.unlinkSync(tmpfile) } catch (e) {} throw err } }
0
0
0
+ 2 other calls in file
graceful-fs.promises is the most popular function in graceful-fs (1135 examples)