예제 #1
0
        public Stream GetFileContent(FileItemPathInfo pathInfo)
        {
            string path = pathInfo?.GetPath();
            string text = Path.Combine(RootDirectoryPath, PreparePath(path));

            if (Path.GetDirectoryName(text) == null)
            {
                _ = string.Empty;
            }
            if (FileSystemService.FileExists(text))
            {
                return(FileSystemService.GetFileContent(text));
            }
            FileManagementExceptionExecutor.ThrowFileNotFound(text);
            return(null);
        }
예제 #2
0
 public void CreateDirectory(FileItemPathInfo pathInfo, string name)
 {
     CreateDirectory(pathInfo?.GetPath(), name);
 }
예제 #3
0
 public IList <IClientFileSystemItem> GetDirectoryContents(FileItemPathInfo pathInfo)
 {
     return(GetDirectoryContents(pathInfo?.GetPath()));
 }
예제 #4
0
 public void Remove(FileItemPathInfo pathInfo)
 {
     Remove(pathInfo?.GetPath());
 }
예제 #5
0
 public void Copy(FileItemPathInfo sourcePathInfo, FileItemPathInfo destinationPathInfo)
 {
     Copy(sourcePathInfo?.GetPath(), destinationPathInfo?.GetPath());
 }
예제 #6
0
 public void Move(FileItemPathInfo sourcePathInfo, FileItemPathInfo destinationPathInfo)
 {
     Move(sourcePathInfo?.GetPath(), destinationPathInfo?.GetPath());
 }
예제 #7
0
 public void Rename(FileItemPathInfo pathInfo, string newName)
 {
     Rename(pathInfo?.GetPath(), newName);
 }