c89252ca8935f4f27f677fd85649728215c1e4e5.svn-base
947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.exists = exports.readFile = void 0;
function _fs() {
const data = _interopRequireDefault(require("fs"));
_fs = function () {
return data;
};
return data;
}
function _gensync() {
const data = _interopRequireDefault(require("gensync"));
_gensync = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const readFile = (0, _gensync().default)({
sync: _fs().default.readFileSync,
errback: _fs().default.readFile
});
exports.readFile = readFile;
const exists = (0, _gensync().default)({
sync(path) {
try {
_fs().default.accessSync(path);
return true;
} catch (_unused) {
return false;
}
},
errback: (path, cb) => _fs().default.access(path, undefined, err => cb(null, !err))
});
exports.exists = exists;