Created
December 19, 2013 12:08
-
-
Save samiy-xx/8038228 to your computer and use it in GitHub Desktop.
read files in dir
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
var d = new Directory("PATH"); | |
d.exists().then((bool exists) { | |
if (!exists) | |
return; | |
d.list().toList().then((List<FileSystemEntity> entities) { | |
entities.forEach((FileSystemEntity entity) { | |
if (entity is File) { | |
// Do something with the file | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment