/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
esm
/
lib
/
fs
/
/opt/canhelp/node_modules/next/dist/esm/lib/fs
mkdir
upload
Name
Size
Mode
Actions
rename.js
3653
0644
edit
dl
rm
rename.js.map
5285
0644
edit
dl
rm
write-atomic.js
508
0644
edit
dl
rm
write-atomic.js.map
1062
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/esm/lib/fs/write-atomic.js
(508B)
import { unlink, writeFile } from 'fs/promises'; import { rename } from './rename'; export async function writeFileAtomic(filePath, content) { const tempPath = filePath + '.tmp.' + Math.random().toString(36).slice(2); try { await writeFile(tempPath, content, 'utf-8'); await rename(tempPath, filePath); } catch (e) { try { await unlink(tempPath); } catch { // ignore } throw e; } } //# sourceMappingURL=write-atomic.js.map
Save
cmd:
run