first commit
This commit is contained in:
26
build/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js
generated
vendored
Normal file
26
build/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js
generated
vendored
Normal 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;
|
||||
Reference in New Issue
Block a user