How to use the unlinkAsync function from fs-extra
Find comprehensive JavaScript fs-extra.unlinkAsync code examples handpicked from public code repositorys.
105 106 107 108 109 110 111 112 113 114
glob.sync(`${store.get('itemset_path')}**/CGG_*.json`), glob.sync(`${store.get('itemset_path')}**/CIFY_*.json`) ]; return Promise.resolve(R.flatten(globbed)) .each(f => fs.unlinkAsync(f)) .catch(err => Log.warn(err)) .then(() => { if (deletebtn !== true) progressbar.incr(2.5); });
169
0
2
69 70 71 72 73 74 75 76 77 78
return sbutil.execFilePromise('mkfs.btrfs', [file]) .then(function () { return exports.mountLoopFile(file, dir); }) .catch(function (err) { return fs.unlinkAsync(file) .throw(err); }); }); }
2
1
0
GitHub: purepennons/UDFS
13 14 15 16 17 18 19 20 21 22
let meta_id = req.params.meta_id let target = path.resolve(path.join(storage_path, fs_id, `${meta_id}_meta`)) fs.accessAsync(target, fs.F_OK) .then( () => { return fs.unlinkAsync(target) }) .then( () => { return res.status(204).json({ status: 'success',
0
0
3
fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)