Atomic file write in stats

This commit is contained in:
Cohee 2023-08-17 15:32:13 +03:00
parent 9c614529ca
commit 8c949ed440
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@
const fs = require("fs"); const fs = require("fs");
const path = require("path"); const path = require("path");
const util = require("util"); const util = require("util");
const writeFile = util.promisify(fs.writeFile); const writeFileAtomic = require("write-file-atomic");
const writeFile = util.promisify(writeFileAtomic);
const readFile = util.promisify(fs.readFile); const readFile = util.promisify(fs.readFile);
const readdir = util.promisify(fs.readdir); const readdir = util.promisify(fs.readdir);
const crypto = require("crypto"); const crypto = require("crypto");