檔案移動和複製

語言: CN / TW / HK
document.getElementById('filemovecopy').addEventListener('tap', function() {

	plus.io.resolveLocalFileSystemURL( "file:///storage/emulated/0/Android/data/doc/yb01.jpg", function( entry )
									  {
		plus.io.resolveLocalFileSystemURL("file:///storage/emulated/0/Android/data/doc/", function(root)
										  {
			var GName = 'yb02.jpg';
			entry.copyTo( root, GName, function( entry ){
				console.log("New Path: " + entry.fullPath);
			},
						 function( e ){
				console.log( "錯1誤"+JSON.stringify(e) );
			});
		})
	});


	plus.io.resolveLocalFileSystemURL( "file:///storage/emulated/0/Android/data/doc/yb01.jpg", function( entry )
									  {
		plus.io.resolveLocalFileSystemURL("file:///storage/emulated/0/Android/data/doc/hisinfos/", function(root)
										  {
			var GName = 'yb01_1.jpg';
			entry.moveTo( root, GName, function( entry ){
				console.log("New Path: " + entry.fullPath);
			},
						 function( e ){
				console.log( "錯1誤"+JSON.stringify(e) );
			});
		})
	});
});