mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 23:59:42 +08:00
feedback
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
|
||||
// Utility function that collects the stats of every file in a directory
|
||||
// as well as in its subdirectories.
|
||||
function getFilesInFolder(folderName, fileList) {
|
||||
var folderFiles = fs.readdirSync(folderName);
|
||||
folderFiles.forEach(function(file) {
|
||||
var fileStats = fs.statSync(folderName + "/" + file);
|
||||
var fileStats = fs.statSync(path.join(folderName, file));
|
||||
if (fileStats.isDirectory()) {
|
||||
getFilesInFolder(folderName + "/" + file, fileList);
|
||||
getFilesInFolder(path.join(folderName, file), fileList);
|
||||
} else {
|
||||
fileStats.path = folderName + "/" + file;
|
||||
fileStats.path = path.join(folderName, file);
|
||||
fileList.push(fileStats);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user