Reputation: 2443
I'm using Atom 1.0.5. I'm trying to create atom package.
I would like to get files name under the workspace.
Is it possible?
dirs = atom.project.getDirectories()
for dir in dirs
for entry in dir.getEntriesSync()
console.log entry.getPath()
Upvotes: 1
Views: 339
Reputation: 54507
You should be able to use the following two APIs:
So you would use Project.getDirectories
first to get a list of directories, and then iterate through them using Directory.getEntries
. Each entry can either be a file or a directory (again).
Upvotes: 1