Esempio n. 1
0
 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");
 }
Esempio n. 2
0
            public static FileInfo Create(PathInfo filePath)
            {
                var fileInfo = new System.IO.FileInfo(filePath.ToString());

                if (!fileInfo.Exists)
                {
                    return(null);
                }

                return(new FileInfo(filePath, fileInfo));
            }
Esempio n. 3
0
 public string GetExtension(PathInfo path)
 {
     return(System.IO.Path.GetExtension(path.ToString()));
 }
Esempio n. 4
0
 public PathInfo GetFileNameWithoutExtension(PathInfo path)
 {
     return(PathInfo.Create(System.IO.Path.GetFileNameWithoutExtension(path.ToString())));
 }
Esempio n. 5
0
 public PathInfo ChangeExtension(PathInfo fileName, string extension)
 {
     return(PathInfo.Create(System.IO.Path.ChangeExtension(fileName.ToString(), extension)));
 }
Esempio n. 6
0
 public PathInfo GetDirectoryName(PathInfo filePath)
 {
     return(PathInfo.Create(System.IO.Path.GetDirectoryName(filePath.ToString())));
 }