first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
'use strict';
var fo = require('../../fileOperations');
function writeBuffer(writePath, file, written) {
var opt = {
mode: file.stat.mode,
flag: file.flag,
};
fo.writeFile(writePath, file.contents, opt, onWriteFile);
function onWriteFile(writeErr, fd) {
if (writeErr) {
return fo.closeFd(writeErr, fd, written);
}
fo.updateMetadata(fd, file, onUpdate);
}
function onUpdate(statErr, fd) {
fo.closeFd(statErr, fd, written);
}
}
module.exports = writeBuffer;