/// <summary> /// Move files. See: https://github.com/FrendsPlatform/Frends.File#Move /// </summary> /// <returns>List [ Object { string SourcePath, string Path } ]</returns> public static async Task <IList <FileInBatchResult> > Move( [PropertyTab] MoveInput input, [PropertyTab] MoveOptions options, CancellationToken cancellationToken) { return(await ExecuteActionAsync(() => MoveCommand.ExecuteAsync(input, options, cancellationToken), options.UseGivenUserCredentialsForRemoteConnections, options.UserName, options.Password)); }
public static async Task <IList <FileInBatchResult> > ExecuteAsync(MoveInput input, MoveOptions moveOptions, CancellationToken cancellationToken) { var result = await FileBatchCommand.ExecuteAsync(input, moveOptions, MoveFilesAsync, cancellationToken, actionNameInErrors : "moved"); // delete source files File.DeleteExistingFiles(result.Select(x => x.SourcePath)); return(result); }