[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 }
------------------------------------------------------------------
Always put yourself in the other's shoes.If you feel that it hurts you,it probably hurts others,too.------------------------------------------------------------------
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步