📜  nodejs 临时文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:36.086000             🧑  作者: Mango

代码示例1
import { mkdtemp } from "fs"
import { tmpdir } from "os"
import { sep } from "path"

const tmpDir = tmpdir()
mkdtemp(`${tmpDir}${sep}`, (err, folder) => {
    if (err) throw err
    return folder
})