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();

 

posted on 2021-06-28 17:28  zqiang0803  阅读(201)  评论(0编辑  收藏  举报

导航