Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enfsmkdirp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enfsmkdirp

mkdir -p for node

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-21.43%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Build status Codacy Badge Donate

NPM

enfsmkdirp

Module that add list functionality to node fs module enfs stands for [E]asy [N]ode [fs]

Description

This module will add a method that allows the creation o directories and sub-directories with one command line. Add mkdir -p functionality to node fs module

  • This module will add following methods to node fs module:
    • mkdirp
    • mkdirpSync

Usage

enfsmkdirp

    var enfsmkdirp = require("esnofsmkdirp");

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

mkdirp

  • mkdirp(path, [options], callback)

Asynchronously create multiple directories levels

path The path can be on the form of a string, an array or "brace-string"

[options]:

  • fs (Object): an alternative fs module to use (default will be enfspatch)
  • mode (String or Number): the mode that will be attributed to the directory being created
  • Path (String)
    enfsmkdirp.mkdirp("/home/path/to/folder", function(err){
        //do something
    });
  • Path (Array)
    enfsmkdirp.mkdirp(["/home/path/to/folder","/var/home/test"], function(err){
        //do something
    });
  • Path ("brace-string")
    enfsmkdirp.mkdirp("./project/{development,production}/{public,css,private,test}", function(err){
        //do something
    });

mkdirpSync

  • mkdirpSync(path, [options])

Synchronously create multiple directories levels

path The path can be on the form of a string, an array or "brace-string"

[options]:

  • fs (Object): an alternative fs module to use (default will be enfspatch)
  • mode (String or Number): the mode that will be attributed to the directory being created
  • Path (String)
    enfsmkdirp.mkdirpSync("/home/path/to/folder");
  • Path (Array)
    enfsmkdirp.mkdirpSync(["/home/path/to/folder","/var/home/test"]);
  • Path ("brace-string")
    enfsmkdirp.mkdirpSync("./project/{development,production}/{public,css,private,test}");

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

FAQs

Package last updated on 20 Feb 2016

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc