fs-extra-enhancer

1.0.4 • Public • Published

what is fs-extra-enhancer

fs-extra-enhancer is for enhancing fs-extra.

const fsee = require('fs-extra-enhancer');

how to use

async

  • fsee.emptyDir(dir[, filter], callback)

    filter is added for fse.emptyDir(dir, callback).

    Sometimes we don't want to empty all files in dir to avoid errors like EACCESS, then we can use this function.

    example:

    fsee.emptyDir(dir, {
        ignored: /\.DS_Store/
    }, function(err) {
        if (err) {
            throw err;
        }
    
        console.log('done');
    })
    

    It won't remove .DS_Store when empty dir, which won't cause EACCESS errors when emptyDir tried to remove files like .idea/.DS_Store/...(sudo is needed).

  • others

    same as fs-extra.

sync

  • fsee.emptyDirSync(dir[, filter])

  • others

    same as fs-extra.

Readme

Keywords

none

Package Sidebar

Install

npm i fs-extra-enhancer

Weekly Downloads

1

Version

1.0.4

License

ISC

Last publish

Collaborators

  • antfoot