/// <summary> /// <para>Begins an asynchronous send to the copy route.</para> /// </summary> /// <param name="fromPath">Path in the user's Dropbox to be copied or moved.</param> /// <param name="toPath">Path in the user's Dropbox that is the destination.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginCopy(string fromPath, string toPath, sys.AsyncCallback callback, object callbackState = null) { var relocationArg = new RelocationArg(fromPath, toPath); return this.BeginCopy(relocationArg, callback, callbackState); }
/// <summary> /// <para>Move a file or folder to a different location in the user's Dropbox.</para> /// <para>If the source path is a folder all its contents will be moved.</para> /// </summary> /// <param name="fromPath">Path in the user's Dropbox to be copied or moved.</param> /// <param name="toPath">Path in the user's Dropbox that is the destination.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RelocationError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="RelocationError"/>.</exception> public t.Task<Metadata> MoveAsync(string fromPath, string toPath) { var relocationArg = new RelocationArg(fromPath, toPath); return this.MoveAsync(relocationArg); }
/// <summary> /// <para>Begins an asynchronous send to the move route.</para> /// </summary> /// <param name="relocationArg">The request parameters.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="state">A user provided object that distinguished this send from other /// send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginMove(RelocationArg relocationArg, sys.AsyncCallback callback, object state = null) { var task = this.MoveAsync(relocationArg); return enc.Util.ToApm(task, callback, state); }
/// <summary> /// <para>Move a file or folder to a different location in the user's Dropbox.</para> /// <para>If the source path is a folder all its contents will be moved.</para> /// </summary> /// <param name="relocationArg">The request parameters</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RelocationError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="RelocationError"/>.</exception> public t.Task<Metadata> MoveAsync(RelocationArg relocationArg) { return this.Transport.SendRpcRequestAsync<RelocationArg, Metadata, RelocationError>(relocationArg, "api", "/files/move", RelocationArg.Encoder, Metadata.Decoder, RelocationError.Decoder); }
/// <summary> /// <para>Copy a file or folder to a different location in the user's Dropbox.</para> /// <para>If the source path is a folder all its contents will be copied.</para> /// </summary> /// <param name="relocationArg">The request parameters</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RelocationError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="RelocationError"/>.</exception> public t.Task<Metadata> CopyAsync(RelocationArg relocationArg) { return this.Transport.SendRpcRequestAsync<RelocationArg, Metadata, RelocationError>(relocationArg, "api", "/files/copy", Dropbox.Api.Files.RelocationArg.Encoder, Dropbox.Api.Files.Metadata.Decoder, Dropbox.Api.Files.RelocationError.Decoder); }
/// <summary> /// <para>Copy a file or folder to a different destination in the user's /// Dropbox.</para> /// <para>If the source path is a folder all its contents will be copied. The /// destination path must not yet exist.</para> /// </summary> /// <param name="relocationArg">The request parameters</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{RelocationError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="RelocationError"/>.</exception> public t.Task<Metadata> CopyAsync(RelocationArg relocationArg) { return this.Transport.SendRpcRequestAsync<RelocationArg, Metadata, RelocationError>(relocationArg, "api", "/files/copy"); }
public override void Move(FileItem from, FileItem to) { var args = new RelocationArg(from.Path, to.Path); var response = DBClient.Files.MoveV2Async(args).Result; }