How to use the unlink function from fs-promise
Find comprehensive JavaScript fs-promise.unlink code examples handpicked from public code repositorys.
GitHub: twosigma/git-meta
239 240 241 242 243 244 245 246 247 248 249
} } finally { if (release !== null) { release(); } yield fs.unlink(tempIndexPath); } });
51
205
22
215 216 217 218 219 220 221 222 223 224
async deleteFile(fileUuid) { const file = this.fileList[fileUuid]; const fileExists = await fs.exists(file.filePath); if (fileExists) { // Delete the file await fs.unlink(file.filePath); logger.info('Just deleted file', file.filePath); // Remove the file object from the 'files' array delete this.fileList[fileUuid]; this.app.io.broadcast('fileEvent', {
20
26
0
GitHub: salil-gtm/SyndiShare
177 178 179 180 181 182 183 184 185 186
}).then(function () { return search(new RegExp(fileName + "$"))(archiveDir); }).then(function (fp) { return fsp.rename(fp[0], filePath); }).then(function () { return fsp.unlink(archivePath); }).then(function () { return fileHash ? checksum(fileHash)(filePath) : null; }).then(function () { return filePath;
7
12
0
118 119 120 121 122 123 124 125 126 127
"Stopped backend (host=" + server.host + " dbKey=" + server.dbKey + ")", ); } try { if (server.dbFile) { await fs.unlink(`${server.dbFile}.mv.db`); } } catch (e) {} }, });
0
0
1
fs-promise.writeJson is the most popular function in fs-promise (6458 examples)