source: imaps-frontend/node_modules/@nodelib/fs.stat/out/providers/sync.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 619 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.read = void 0;
4function read(path, settings) {
5 const lstat = settings.fs.lstatSync(path);
6 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
7 return lstat;
8 }
9 try {
10 const stat = settings.fs.statSync(path);
11 if (settings.markSymbolicLink) {
12 stat.isSymbolicLink = () => true;
13 }
14 return stat;
15 }
16 catch (error) {
17 if (!settings.throwErrorOnBrokenSymbolicLink) {
18 return lstat;
19 }
20 throw error;
21 }
22}
23exports.read = read;
Note: See TracBrowser for help on using the repository browser.