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);
  });
fork icon169
star icon0
watch icon2

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);
      });
  });
}
fork icon2
star icon1
watch icon0

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',
fork icon0
star icon0
watch icon3

function icon

fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)