Socket
Book a DemoInstallSign in
Socket

enfs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

enfs

Extras suite for node fs module

unpublished
latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Build Status Build status Codacy Badge Donate

NPM

enfs

Module that add methods and patches to node fs module

enfs stands for [E]asy [N]ode [fs]

Description

This module will add many methods to node fs module. This is just the main module that will join many modules of the family of enfs, making it easier to use many of the methods present in each module.

Modules

Methods Added

  • emptyDir

  • emptyDirSync

Usage

enfs is a drop-in replacement for native fs module, you just need to include it instead of the native module.

Use this

    var enfs = require("enfs");

instead of

    var fs = require("fs"); //You don't need to do this anymore

and all the methods from native fs module are available

Errors

All the methods follows the node culture.

  • Async: Every async method returns an Error in the first callback parameter
  • Sync: Every sync method throws an Error.

Additional Methods

emptyDir

  • emptyDir(path, callback)

Remove all items from the directory this method use rimraf, then you can pass wildcards to the path like you do in rimraf

    enfs.emptyDir("/path/to/empty/*", function(err){
        if(!err) {
            console.log("Directory is empty");
        }
    });

emptyDirSync

  • emptyDirSync(path)

Remove all items from the directory this method use rimraf.sync, then you can pass wildcards to the path like you do in rimraf

    enfs.emptyDirSync("/path/to/empty/*");
    console.log("Directory is empty");

Additional mehods from modules

License

Creative Commons Attribution 4.0 International License

Copyright (c) 2016 Joao Parreira joaofrparreira@gmail.com GitHub

This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit CC-BY-4.0.

Keywords

array

FAQs

Package last updated on 31 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.