How to use the filesAsync function from node-dir
Find comprehensive JavaScript node-dir.filesAsync code examples handpicked from public code repositorys.
185 186 187 188 189 190 191 192 193
var forceWrite = opts.forceWrite; var lastGlobalUpdate = opts.lastGlobalUpdate; var ignoreList = opts.ignoreList; var namePattern = opts.namePattern; return dir.filesAsync(absDirSrc) .each(function(absFileSrc) { var relFileSrc = path.relative(absDirSrc, absFileSrc); var relFileDest = path.join(relDirDest, relFileSrc);
299
2
1
28 29 30 31 32 33 34 35 36 37
if (!self.options.folder) { return; } var mode = self.options.mode || 33261; var targetDir = path.resolve(getOutputDir(compiler), self.options.folder); dir.filesAsync(targetDir) .map(function(file) { return fs.chmodAsync(file, mode); }); });
2
36
11
870 871 872 873 874 875 876 877 878 879 880 881 882
return null; } async function getDAPValueOfNodeName(rootName, categoryName, DAP_PATH) { const filePaths = await dir.filesAsync(DAP_PATH + "/" + categoryName); // console.log(filePaths); const DAPPath = getFilePathByNodeName(rootName, filePaths); const DAPData = await csv({
0
0
0
+ 3 other calls in file
32 33 34 35 36 37 38 39 40 41
}, schemas); return response; } export default function parseSchemas(config) { return dir.filesAsync(`${config.appPath}/templates`) .then((files) => { return all(R.map(getSchema, files)); }) .then((schemas) => {
0
0
61
37 38 39 40 41 42 43 44 45
var forceWrite = opts.forceWrite; var ignoreList = opts.ignoreList; var copyUnmodified = opts.copyUnmodified; var writtenAssetHashes = opts.writtenAssetHashes; return dir.filesAsync(absDirSrc).map(function (absFileSrc) { var relFileDest = void 0; var relFileSrc = _path2.default.relative(absDirSrc, absFileSrc);
0
0
0
node-dir.readFiles is the most popular function in node-dir (61 examples)