create-file:仅当文件不存在时才写入

时间:2021-05-14 07:33:26
【文件属性】:
文件名称:create-file:仅当文件不存在时才写入
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-14 07:33:26
JavaScript 创建文件 仅当文件不存在时才写入 安装 使用安装create-file : npm install --save create-file 用法 模块使用 var createFile = require ( 'create-file' ) ; createFile ( '/path/to/file/to-create' , 'my content\n' , function ( err ) { // file either already exists or is now created (including non existing directories) } ) ; 原料药 createFile(filename, contents, cb) 名称 类型 描述 文件名 String 要创建的文件名 内容 String 要写的内容 b Function 打回来 执照 麻
【文件预览】:
create-file-master
----src()
--------index.js(291B)
----.npmignore(6B)
----test()
--------existing-file(8B)
--------create-file-test.js(935B)
----README.md(1021B)
----.gitignore(14B)
----package.json(565B)

网友评论