🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

mk_path666

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

mk_path666

mkpath directly

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

目标

原生fs模块无法直接以一个不存在路径创建文件或目录, 本模块希望做到这一点。

思路

将路径分解为多级目录,依次尝试创建

用法

$ npm install mk_path666

after install package, use this to mk a path

const mk_path = require("../lib/mk_path.js")

mk_path.dir("./hel/lo/wor/ld",(err,dirpath)=>{if(err) throw err});

first parameter is path you want to make,it most be an not empty String. sceond parameter is callback function after mkdir,err will be null if action sucess.

FAQs

Package last updated on 17 Jun 2018

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