Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
569 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.readFile = exports.stat = void 0;
|
---|
| 7 |
|
---|
| 8 | const stat = (inputFileSystem, path) => new Promise((resolve, reject) => {
|
---|
| 9 | inputFileSystem.stat(path, (err, stats) => {
|
---|
| 10 | if (err) {
|
---|
| 11 | reject(err);
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | resolve(stats);
|
---|
| 15 | });
|
---|
| 16 | });
|
---|
| 17 |
|
---|
| 18 | exports.stat = stat;
|
---|
| 19 |
|
---|
| 20 | const readFile = (inputFileSystem, path) => new Promise((resolve, reject) => {
|
---|
| 21 | inputFileSystem.readFile(path, (err, stats) => {
|
---|
| 22 | if (err) {
|
---|
| 23 | reject(err);
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | resolve(stats);
|
---|
| 27 | });
|
---|
| 28 | });
|
---|
| 29 |
|
---|
| 30 | exports.readFile = readFile; |
---|
Note:
See
TracBrowser
for help on using the repository browser.