pv-node-smb2
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -20,3 +20,9 @@ "use strict"; | ||
fileInfo(smbPath) { | ||
return pv.pvFileInfoFromContext(this.ctx, smbPath); | ||
let entry = pv.pvFileInfoFromContext(this.ctx, smbPath); | ||
return { | ||
...entry, | ||
btime: new Date(entry.btime_ts), | ||
mtime: new Date(entry.mtime_ts), | ||
ctime: new Date(entry.ctime_ts) | ||
}; | ||
} | ||
@@ -42,2 +48,2 @@ readFileSync(smbPath) { | ||
exports.PvNodeSmb2 = PvNodeSmb2; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHYtc21iMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wdi1zbWIyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHdEQUFnQztBQUVoQyxNQUFNLEVBQUUsR0FBRyxJQUFBLGtCQUFRLEVBQUMsSUFBSSxDQUFDLENBQUM7QUFvQjFCLE1BQWEsVUFBVTtJQUdyQixZQUFZLFNBQWdCLEVBQUUsUUFBZSxFQUFFLFFBQWU7UUFDNUQsSUFBSSxDQUFDLGFBQWEsQ0FBQyxTQUFTLEVBQUMsUUFBUSxFQUFDLFFBQVEsQ0FBQyxDQUFBO0lBQ2pELENBQUM7SUFFRCxhQUFhLENBQUMsU0FBZ0IsRUFBRSxRQUFlLEVBQUUsUUFBZTtRQUM5RCxJQUFJLENBQUMsR0FBRyxHQUFHLEVBQUUsQ0FBQyxlQUFlLENBQUMsU0FBUyxFQUFDLFFBQVEsRUFBQyxRQUFRLENBQUMsQ0FBQTtJQUM1RCxDQUFDO0lBRUQsYUFBYTtRQUNYLEVBQUUsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQzlCLENBQUM7SUFHRCxRQUFRLENBQUMsT0FBYztRQUNyQixPQUFPLEVBQ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ERhdGUoZW50cnkuY3RpbWVfdHMpXG4gICAgICB9IGFzIFB2RGlyZW50XG4gICAgfSk7XG5cbiAgfVxuXG5cbn1cbiJdfQ== |
@@ -40,3 +40,10 @@ import bindings from 'bindings'; | ||
fileInfo(smbPath:string):PvDirent{ | ||
return pv.pvFileInfoFromContext(this.ctx,smbPath); | ||
let entry = pv.pvFileInfoFromContext(this.ctx,smbPath); | ||
return { | ||
...entry, | ||
btime: new Date(entry.btime_ts), | ||
mtime: new Date(entry.mtime_ts), | ||
ctime: new Date(entry.ctime_ts) | ||
} | ||
} | ||
@@ -43,0 +50,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/pontus-vision/pv-node-smb2", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"engines": { | ||
@@ -8,0 +8,0 @@ "node": ">= 10.16.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147322
161