How to use the rmdir function from fs-extra

Find comprehensive JavaScript fs-extra.rmdir code examples handpicked from public code repositorys.

738
739
740
741
742
743
744
745
746
747
} catch (e) {
  // Ignore this, it was hopefully unmounted successfully before
}

try {
  await fs.rmdir(absolutePath);
} catch (e) {
  logger.error(`Failed to remove temporary directory ${absolutePath}`);
  logger.error(e);
}
fork icon250
star icon246
watch icon14

+ 7 other calls in file

238
239
240
241
242
243
244
245
246
247
- fs.readdir():读取目录的内容
- fs.readFile():读取文件的内容。有关:fs.read()
- fs.readlink():读取符号链接的值
- fs.realpath():将相对文件路径指针(.,..)解析为完整路径
- fs.rename():重命名文件或文件夹
- fs.rmdir():删除文件夹
- fs.stat():返回由传递的文件名标识的文件的状态。相关阅读:fs.fstat(),fs.lstat()
- fs.symlink():创建指向文件的新符号链接
- fs.truncate():将传递的文件名标识的文件截断为指定的长度。有关:fs.ftruncate()
- fs.unlink():删除文件或符号链接
fork icon0
star icon12
watch icon1

+ 13 other calls in file

258
259
260
261
262
263
264
265
266
267

if (fs.existsSync(apkPath)) {
    // Perform a check on apk size
    await fs.stat(apkPath, async(err, stats) => {
        if (stats.size == 0 || stats.size == undefined) {
            await fs.rmdir(appSaveInfo.appSavePath).catch(logger.warning);
            return Promise.reject('File did not successfully download and is a empty size');
        }

        await db.updateDownloadedApp(app, appSaveInfo, config.system_config.vm_name);
fork icon3
star icon3
watch icon2

+ 19 other calls in file

103
104
105
106
107
108
109
110
111
fs.unlink("./uploads/" + result[0].id + ".jpg", (err) => {

  console.log('Deleted jpg: ' + result[0].id);
});
//Delete dir from post
fs.rmdir("./uploads/" + result[0].id, (err) => {

  console.log('Deleted dir: ' + result[0].id);
});
fork icon0
star icon0
watch icon1

+ 27 other calls in file

function icon

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