Exemple #1
0
        public virtual Task CreateFolderAsync(FolderCreateDto input)
        {
            string fileSystemPath = GetFileSystemBashPath();

            if (!input.Parent.IsNullOrWhiteSpace())
            {
                fileSystemPath = GetFileSystemPath(input.Parent);
            }
            var newFloderPath = Path.Combine(fileSystemPath, input.Path);

            if (Directory.Exists(newFloderPath))
            {
                throw new UserFriendlyException(L["PathAlreadyExists"]);
            }
            Directory.CreateDirectory(newFloderPath);

            return(Task.CompletedTask);
        }
Exemple #2
0
 public virtual async Task CreateFolderAsync(FolderCreateDto input)
 {
     await FileSystemAppService.CreateFolderAsync(input);
 }