예제 #1
0
 /// <summary>
 ///Copy a file to a new location on the file system. It is an error to attempt to:
 ///copy a file into its parent if a name different from its current one is not provided.
 /// </summary>
 /// <param name="parent"> The parent directory to which to copy the file.</param>
 /// <param name="newName"> The new name of the file. Defaults to the current name if unspecified.</param>
 /// <param name="successCallback">A callback that is called with the FileEntry object of the new file.</param>
 /// <param name="errorCallback">A callback that is called if an error occurs when attempting to copy the file. Invoked with a FileError object.</param>
 /// <returns></returns>
 /// <example>
 /// usage
 /// <code>
 ///function win(entry) {
 ///    console.log("New Path: " + entry.fullPath);
 ///}
 ///function fail(error) {
 ///    alert(error.code);
 ///}
 ///function copyFile(entry) {
 ///    var parent = document.getElementById('parent').value,
 ///        parentName = parent.substring(parent.lastIndexOf('/')+1),
 ///        parentEntry = new DirectoryEntry(parentName, parent);
 ///    // copy the file to a new directory and rename it
 ///    entry.copyTo(parentEntry, "file.copy", success, fail);
 ///}
 /// </code>
 /// </example>
 public void copyTo(DirectoryEntry parent, JsString newName, MoveToSuccessCallback successCallback, MoveToErrorCallback errorCallback) { }
예제 #2
0
 /// <summary>
 /// Copy a directory to a different location on the file system. It is an error to attempt to:
 /// copy a directory inside itself at any depth;
 /// copy a directory into its parent if a name different from its current one is not provided.
 /// Directory copies are always recursive - that is, they copy all contents of the directory.
 /// </summary>
 /// <param name="parent">The parent directory to which to copy the directory.</param>
 /// <param name="newName">The new name of the directory. Defaults to the current name if unspecified.</param>
 /// <param name="successCallback">A callback that is called with the DirectoryEntry object of the new directory.</param>
 /// <param name="errorCallback"> A callback that is called if an error occurs when attempting to copy the underlying directory. Invoked with a FileError object</param>
 /// <returns></returns>
 /// <example>
 /// usage
 /// <code>
 /// function win(entry) {
 ///    console.log("New Path: " + entry.fullPath);
 ///}
 ///function fail(error) {
 ///    alert(error.code);
 ///}
 ///function copyDir(entry) {
 ///    var parent = document.getElementById('parent').value,
 ///        parentName = parent.substring(parent.lastIndexOf('/')+1),
 ///        newName = document.getElementById('newName').value,
 ///        parentEntry = new DirectoryEntry(parentName, parent);
 ///    // copy the directory to a new directory and rename it
 ///    entry.copyTo(parentEntry, newName, success, fail);
 ///}
 /// </code>
 /// </example>
 public void copyTo(DirectoryEntry parent, JsString newName, JsAction<FileEntry> successCallback, JsAction errorCallback) { }