fs-temp:Node.js 中的临时文件和目录

时间:2024-08-24 07:22:12
【文件属性】:

文件名称:fs-temp:Node.js 中的临时文件和目录

文件大小:12KB

文件格式:ZIP

更新时间:2024-08-24 07:22:12

JavaScript

fs-temp fs-temp是一种创建临时文件和目录的快速而简单的方法。 为什么是另一个? 我知道已经有图书馆在做类似的事情,但我觉得他们的实现是不必要的复杂。 我还想要一种将缓冲区转换为文件的快速方法。 安装 npm install --save fs-temp 用法 import temp from 'fs-temp' const data = Buffer . from ( 'testing 1 2 3' ) const path = temp . writeFileSync ( data ) // `path` now holds the path to a file with the specified `data` import temp from 'fs-temp' const path = temp . template ( 'linusu-%s' ) . mk


【文件预览】:
fs-temp-master
----.github()
--------workflows()
----lib()
--------temp.js(3KB)
--------retry.js(562B)
--------write-stream.js(493B)
----promises.js(1009B)
----promises.d.ts(4KB)
----LICENSE(1KB)
----test()
--------write-file.js(1KB)
--------template.js(2KB)
--------open.js(2KB)
--------stream.js(1KB)
--------mkdir.js(724B)
----README.md(3KB)
----index.d.ts(4KB)
----.npmrc(19B)
----.gitignore(13B)
----index.js(938B)
----package.json(549B)

网友评论