dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/graceful-readlink/index.js

13 lines
188 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01:00
var fs = require('fs')
, lstat = fs.lstatSync;
exports.readlinkSync = function (p) {
if (lstat(p).isSymbolicLink()) {
return fs.readlinkSync(p);
} else {
return p;
}
};