public virtual async Task MoveFolderAsync([Required, StringLength(255)] string path, FolderMoveDto input) { await FileSystemAppService.MoveFolderAsync(path, input); }
public virtual Task MoveFolderAsync([Required, StringLength(255)] string path, FolderMoveDto input) { string fileSystemPath = GetFileSystemPath(path); if (!Directory.Exists(fileSystemPath)) { throw new UserFriendlyException(L["FilePathNotFound"]); } var moveToFilePath = GetFileSystemPath(input.MoveToPath); if (Directory.Exists(moveToFilePath)) { throw new UserFriendlyException(L["FilePathAlreadyExists"]); } Directory.Move(fileSystemPath, moveToFilePath); return(Task.CompletedTask); }