as3.0 AIR 获取文件夹里面的图片、文档。删除文件夹里的图片和文档

var directory: File = new File();
directory.url = "file:///D:/MuLu/"

var contents: Array = directory.getDirectoryListing();
for (var i: uint = 0; i < contents.length; i++) {
    //获取
trace(contents[i].name, contents[i].size);
}

var directory: File = new File();
directory.url = "file:///D:/MuLu/22.jpg"

//删除
directory.moveToTrash();

 

上一篇:Dos操作


下一篇:oracle 备份