How to use the readFiles function from node-dir
Find comprehensive JavaScript node-dir.readFiles code examples handpicked from public code repositorys.
GitHub: Codebrahma/site
91 92 93 94 95 96 97 98 99 100
} const generator = (createNode) => ( Promise.all([ new Promise((resolve, reject) => { dir.readFiles( blogConfig.siteBlogPath, fileReadingOptions, sourceBlogs(createNode), resolve
128
0
4
+ 3 other calls in file
107 108 109 110 111 112 113 114 115 116
/** * Post processing for example files */ function postProcessingOfExampleFiles() { nodedir.readFiles( COPY_FILES_PATH, { match: /.html$/, recursive: true
15
100
13
23 24 25 26 27 28 29 30 31 32
var mdFiles = {}, aliases = {}, dirOpts = { match: /.md/, exclude: /^_/ } dir.readFiles(wikiPath, dirOpts, function (err, content, filename, next) { if (!err) { mdFiles[filename] = content var base = path.basename(filename) aliases[base.substr(0, base.length - 3)] = filename
62
40
3
5 6 7 8 9 10 11 12 13 14
const files = [] printOptions(options) readFiles( options.source, { match: new RegExp(`\\.(?:${options.extensions.join('|')})$`), exclude: options.exclude && new RegExp(options.exclude),
3
8
1
74 75 76 77 78 79 80 81 82 83
} function buildMarkdown(callback) { var terms = {}; dir.readFiles('./metaphors', { match: /.md$/, exclude: /^\./, recursive: false }, function(err, content, filename, next) {
6
5
1
GitHub: stephentuso/pubxml
73 74 75 76 77 78 79 80 81 82 83
/** * Process values folder containing resource xml files */ function processValuesFolder (path, callback) { dir.readFiles(path, { match: /\.xml$/ }, function (err, content, filename, next) {
2
6
0
227 228 229 230 231 232 233 234 235 236
Expect(fileMatch).is.a.String('fSRD filematch'); Expect(options).is.an.Object(); return new Promise((resolve, reject) => { let filteredList = []; let rejectList = []; Dir.readFiles(dir , { match: new RegExp(fileMatch), exclude: /^\./, recursive: false }, function(err, content, filepath, next) {
0
0
2
+ 11 other calls in file
node-dir.readFiles is the most popular function in node-dir (61 examples)