Upsilon-VsCode/Client/node_modules/vinyl-fs/lib/dest/writeContents/writeSymbolicLink.js

21 lines
389 B
JavaScript
Raw Normal View History

2019-02-17 17:07:28 +00:00
'use strict';
var fs = require('graceful-fs');
function writeSymbolicLink(writePath, file, written) {
// TODO handle symlinks properly
fs.symlink(file.symlink, writePath, function(err) {
if (isFatalError(err)) {
return written(err);
}
written();
});
}
function isFatalError(err) {
return (err && err.code !== 'EEXIST');
}
module.exports = writeSymbolicLink;