index.js
878 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
var assign = require('./util/assign')
var fse = {}
var gfs = require('graceful-fs')
// attach fs methods to fse
Object.keys(gfs).forEach(function (key) {
fse[key] = gfs[key]
})
var fs = fse
assign(fs, require('./copy'))
assign(fs, require('./copy-sync'))
assign(fs, require('./mkdirs'))
assign(fs, require('./remove'))
assign(fs, require('./json'))
assign(fs, require('./move'))
assign(fs, require('./streams'))
assign(fs, require('./empty'))
assign(fs, require('./ensure'))
assign(fs, require('./output'))
assign(fs, require('./walk'))
module.exports = fs
// maintain backwards compatibility for awhile
var jsonfile = {}
Object.defineProperty(jsonfile, 'spaces', {
get: function () {
return fs.spaces // found in ./json
},
set: function (val) {
fs.spaces = val
}
})
module.exports.jsonfile = jsonfile // so users of fs-extra can modify jsonFile.spaces