开发者

Adobe AIR copyto

开发者 https://www.devze.com 2023-01-30 13:44 出处:网络
I\'m trying to move files from myLocation to the Desktop, but my copyTo syntax is wrong: var myLocation = new air.File(myVolume);

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

精彩评论

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

关注公众号