currentDirec.getDirectory(destDir, {}, function(dirEntry) {
fileEntry.copyTo(dirEntry); }, errorHandler...);
}, errorHandler);
}
copy(fileSystem.root, 'hudao.txt', 'Documents/');
移动文件
移动hudao.txt到Document...currentDirec.getDirectory(directoryName, {}, function(dirEntry) {
fileEntry.moveTo(dirEntry);
}, errorHandler...);
}, errorHandler);
}
move(fileSystem.root, 'hudao.txt', 'Documents/');
重命名文件
将hudao.txt重命名成hudaokeji.txt...currentDirec.getFile(srcEntry, {}, function(fileEntry) {
fileEntry.moveTo(currentDirec, newName);
}, errorHandler