Created
April 10, 2022 13:51
-
-
Save antondevv/b906ae9f9cd6a39e040f85edd852daf6 to your computer and use it in GitHub Desktop.
recursive
This file contains 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
let files = []; | |
function fromDir(pathName) { | |
const entries = getEntries(pathName); | |
entries.forEach((entry) => { | |
const entryPath = `${pathName}/${entry}`; | |
const typeOfEntry = getTypeOfEntry(entryPath); | |
if (typeOfEntry.isDirectory()) { | |
fromDir(entryPath); | |
} else { | |
files.push(entryPath); | |
} | |
}); | |
} | |
fromDir("src"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment