Socket
Socket
Sign inDemoInstall

yu-node

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yu-node

仅用于node.js


Version published
Maintainers
1
Install size
21.0 kB
Created

Readme

Source

yu-node

仅用于node

安装

npm install yu-node --save

引入

const { emptyDir,rmDir,getAllFiles } = require('yu-node');

emptyDir(dirPath)`:清空目录,完成返回true,否则返回false

let bool = emptyDir('./目录a');  //true 或 false

rmDir(dirPath):清空并删除目录,完成返回true,否则返回false

let bool = rmDir('./目录a');  //true 或 false

getAllFiles(dirName):获取目录下的所有文件名

let arr = getAllFiles('./目录名');  
//[ 'D:\\demo\\node-babel\\src\\foo\\a.css','D:\\demo\\node-babel\\src\\foo\\b.js',]

FAQs

Last updated on 29 Jun 2019

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc