public virtual Task CopyFolderAsync([Required, StringLength(255)] string path, FolderCopyDto input)
        {
            string fileSystemPath = GetFileSystemPath(path);

            if (!Directory.Exists(fileSystemPath))
            {
                throw new UserFriendlyException(L["PathNotFound"]);
            }
            var copyToFilePath = GetFileSystemPath(input.CopyToPath);

            if (Directory.Exists(copyToFilePath))
            {
                throw new UserFriendlyException(L["FilePathAlreadyExists"]);
            }

            CopyDirectory(fileSystemPath, copyToFilePath);

            return(Task.CompletedTask);
        }
Beispiel #2
0
 public virtual async Task CopyFolderAsync([Required, StringLength(255)] string path, FolderCopyDto input)
 {
     await FileSystemAppService.CopyFolderAsync(path, input);
 }