Skip to content

Instantly share code, notes, and snippets.

@samiy-xx
Created December 19, 2013 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samiy-xx/8038228 to your computer and use it in GitHub Desktop.
Save samiy-xx/8038228 to your computer and use it in GitHub Desktop.
read files in dir
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