Last active
July 15, 2016 15:41
-
-
Save Bargs/e9bd1a41d5d1e0aea912e30248db0675 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getFilesRecursivelyFromTopDir(topDir, translationFiles, languageList) { | |
| return readdir(topDir) | |
| .then((topDirectoryListing) => { | |
| return Promise.map(topDirectoryListing, (listing) => { | |
| const fullPath = path.join(topDir, listing); | |
| return stat(fullPath).then((stats) => { | |
| if (stats.isDirectory()) { | |
| console.log('** FullPath **: ' + fullPath + ' is a directory'); | |
| getTranslationDetailsFromDirectory(fullPath, translationFiles, languageList); | |
| } else { | |
| console.log('** FullPath **: ' + fullPath + ' is a file'); | |
| getTranslationDetailsFromFile(fullPath, translationFiles, languageList); | |
| } | |
| }) | |
| }) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment