开发者

Adobe AIR copyto

I'm trying to move files from myLocation to the Desktop, but my copyTo syntax is wrong:

var myLocation = new air.File(myVolume); 
var files = myLocation.getDirectoryListing();
for (var f=0; f < files.length; f++){
    if (!files[f].isDirectory) {
        targetFile = air.File.desktopDirectory.resolvePath(files[f].name);
        files[f].copyTo(targetFile); // This line doesn't work开发者_StackOverflow社区.
    }
}


files[f].moveTo(targetFile,true); // Overwrite
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜