forked from enviPath/enviPy
Current Dev State
This commit is contained in:
19
static/js/ketcher2/node_modules/vinyl-fs/lib/src/getStats.js
generated
vendored
Normal file
19
static/js/ketcher2/node_modules/vinyl-fs/lib/src/getStats.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
var through2 = require('through2');
|
||||
var fs = require('graceful-fs');
|
||||
|
||||
function getStats() {
|
||||
return through2.obj(fetchStats);
|
||||
}
|
||||
|
||||
function fetchStats(file, enc, cb) {
|
||||
fs.lstat(file.path, function (err, stat) {
|
||||
if (stat) {
|
||||
file.stat = stat;
|
||||
}
|
||||
cb(err, file);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getStats;
|
||||
Reference in New Issue
Block a user