summaryrefslogtreecommitdiffstats
path: root/node_modules/@nodelib/fs.stat/out/providers
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@nodelib/fs.stat/out/providers')
-rw-r--r--node_modules/@nodelib/fs.stat/out/providers/async.d.ts5
-rw-r--r--node_modules/@nodelib/fs.stat/out/providers/async.js31
-rw-r--r--node_modules/@nodelib/fs.stat/out/providers/sync.d.ts4
-rw-r--r--node_modules/@nodelib/fs.stat/out/providers/sync.js22
4 files changed, 62 insertions, 0 deletions
diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
new file mode 100644
index 0000000..a9637c5
--- /dev/null
+++ b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts
@@ -0,0 +1,5 @@
+import Settings from '../settings';
+import { ErrnoException, Stats } from '../types';
+export declare type AsyncCallback = (err: ErrnoException, stats: Stats) => void;
+export declare function read(path: string, settings: Settings, callback: AsyncCallback): void;
+//# sourceMappingURL=async.d.ts.map \ No newline at end of file
diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.js b/node_modules/@nodelib/fs.stat/out/providers/async.js
new file mode 100644
index 0000000..ab98c29
--- /dev/null
+++ b/node_modules/@nodelib/fs.stat/out/providers/async.js
@@ -0,0 +1,31 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function read(path, settings, callback) {
+ settings.fs.lstat(path, (lstatError, lstat) => {
+ if (lstatError !== null) {
+ return callFailureCallback(callback, lstatError);
+ }
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ return callSuccessCallback(callback, lstat);
+ }
+ settings.fs.stat(path, (statError, stat) => {
+ if (statError !== null) {
+ if (settings.throwErrorOnBrokenSymbolicLink) {
+ return callFailureCallback(callback, statError);
+ }
+ return callSuccessCallback(callback, lstat);
+ }
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ callSuccessCallback(callback, stat);
+ });
+ });
+}
+exports.read = read;
+function callFailureCallback(callback, error) {
+ callback(error);
+}
+function callSuccessCallback(callback, result) {
+ callback(null, result);
+}
diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
new file mode 100644
index 0000000..f4c1d78
--- /dev/null
+++ b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
@@ -0,0 +1,4 @@
+import Settings from '../settings';
+import { Stats } from '../types';
+export declare function read(path: string, settings: Settings): Stats;
+//# sourceMappingURL=sync.d.ts.map \ No newline at end of file
diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.js b/node_modules/@nodelib/fs.stat/out/providers/sync.js
new file mode 100644
index 0000000..31dab38
--- /dev/null
+++ b/node_modules/@nodelib/fs.stat/out/providers/sync.js
@@ -0,0 +1,22 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function read(path, settings) {
+ const lstat = settings.fs.lstatSync(path);
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ return lstat;
+ }
+ try {
+ const stat = settings.fs.statSync(path);
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ return stat;
+ }
+ catch (error) {
+ if (!settings.throwErrorOnBrokenSymbolicLink) {
+ return lstat;
+ }
+ throw error;
+ }
+}
+exports.read = read;