[AIR] AS3读取本地文件夹中的文件

复制代码
 1 import flash.filesystem.File;
 2 import flash.net.URLLoader;
 3 //var dir:File = File.desktopDirectory;
 4 //var dir:File = File.applicationStorageDirectory;
 5 var dir:File = File.applicationDirectory;
 6 dir = dir.resolvePath("a/");
 7 var files:Array = dir.getDirectoryListing();
 8 for (var i:int = 0; i <files.length; i++) {
 9     trace(files[i].name);
10     trace((files[i] as File).nativePath);
11 }
复制代码

 

posted on   晏过留痕  阅读(2120)  评论(0编辑  收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示