1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.stat = exports.exists = exports.readFile = void 0;
|
7 |
|
8 | const fs = require("fs");
|
9 |
|
10 | const gensync = require("gensync");
|
11 |
|
12 | const readFile = gensync({
|
13 | sync: fs.readFileSync,
|
14 | errback: fs.readFile
|
15 | });
|
16 | exports.readFile = readFile;
|
17 | const exists = gensync({
|
18 | sync(path) {
|
19 | try {
|
20 | fs.accessSync(path);
|
21 | return true;
|
22 | } catch (_unused) {
|
23 | return false;
|
24 | }
|
25 | },
|
26 |
|
27 | errback: (path, cb) => fs.access(path, undefined, err => cb(null, !err))
|
28 | });
|
29 | exports.exists = exists;
|
30 | const stat = gensync({
|
31 | sync: fs.statSync,
|
32 | errback: fs.stat
|
33 | });
|
34 | exports.stat = stat; |
\ | No newline at end of file |