Created
October 23, 2018 08:36
-
-
Save marchbold/793a442070cd044f892f8e67b3900609 to your computer and use it in GitHub Desktop.
List files in File.applicationStorage
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 listFiles( file:File, prefix:String="" ):void | |
| { | |
| if (file.isDirectory) | |
| { | |
| var files:Array = file.getDirectoryListing(); | |
| for each (var f:File in files) | |
| { | |
| listFiles( f, prefix + file.name + "/" ); | |
| } | |
| } | |
| else | |
| { | |
| trace( prefix + file.name + " (" + file.nativePath +")" ); | |
| } | |
| } | |
| listFiles( File.applicationStorageDirectory ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment