public ZipFileSystem(string filePath, string rootPath) { _filePath = PathInfo.Create(filePath); _rootPath = PathInfo.Create(rootPath); _rootPathString = _rootPath.ToString(); _rootPathLength = _rootPathString.Length; _file = new ZipFile(filePath); _etag = new FileInfo(filePath).LastWriteTimeUtc.Ticks.ToString("X8"); }
public static FileInfo Create(PathInfo filePath) { var fileInfo = new System.IO.FileInfo(filePath.ToString()); if (!fileInfo.Exists) { return(null); } return(new FileInfo(filePath, fileInfo)); }
public string GetExtension(PathInfo path) { return(System.IO.Path.GetExtension(path.ToString())); }
public PathInfo GetFileNameWithoutExtension(PathInfo path) { return(PathInfo.Create(System.IO.Path.GetFileNameWithoutExtension(path.ToString()))); }
public PathInfo ChangeExtension(PathInfo fileName, string extension) { return(PathInfo.Create(System.IO.Path.ChangeExtension(fileName.ToString(), extension))); }
public PathInfo GetDirectoryName(PathInfo filePath) { return(PathInfo.Create(System.IO.Path.GetDirectoryName(filePath.ToString()))); }