Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
702 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = Object.assign(
|
---|
| 4 | {},
|
---|
| 5 | // Export promiseified graceful-fs:
|
---|
| 6 | require('./fs'),
|
---|
| 7 | // Export extra methods:
|
---|
| 8 | require('./copy-sync'),
|
---|
| 9 | require('./copy'),
|
---|
| 10 | require('./empty'),
|
---|
| 11 | require('./ensure'),
|
---|
| 12 | require('./json'),
|
---|
| 13 | require('./mkdirs'),
|
---|
| 14 | require('./move-sync'),
|
---|
| 15 | require('./move'),
|
---|
| 16 | require('./output'),
|
---|
| 17 | require('./path-exists'),
|
---|
| 18 | require('./remove')
|
---|
| 19 | )
|
---|
| 20 |
|
---|
| 21 | // Export fs.promises as a getter property so that we don't trigger
|
---|
| 22 | // ExperimentalWarning before fs.promises is actually accessed.
|
---|
| 23 | const fs = require('fs')
|
---|
| 24 | if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
|
---|
| 25 | Object.defineProperty(module.exports, 'promises', {
|
---|
| 26 | get () { return fs.promises }
|
---|
| 27 | })
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.