del:删除文件和目录

时间:2021-02-26 10:47:41
【文件属性】:
文件名称:del:删除文件和目录
文件大小:10KB
文件格式:ZIP
更新时间:2021-02-26 10:47:41
JavaScript 德尔 使用删除文件和目录 与相似,但具有Promise API并支持多个文件和globlob。 它还可以防止您删除当前的工作目录及更高版本。 安装 $ npm install del 用法 const del = require ( 'del' ) ; ( async ( ) => { const deletedFilePaths = await del ( [ 'temp/*.js' , '!temp/unicorn.js' ] ) ; const deletedDirectoryPaths = await del ( [ 'temp' , 'public' ] ) ; console . log ( 'Deleted files:\n' , deletedFilePaths . join ( '\n' ) ) ; console . log ( '\n\n' ) ; cons
【文件预览】:
del-main
----benchmark.js(2KB)
----index.test-d.ts(763B)
----.gitattributes(19B)
----.github()
--------funding.yml(109B)
--------security.md(179B)
--------workflows()
----test.js(9KB)
----license(1KB)
----index.d.ts(3KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(3KB)
----readme.md(4KB)
----package.json(1KB)

网友评论