Example #1
0
 public IEnumerable <PathInfo> DirectoryGetFiles(PathInfo directory, string fileExtension)
 {
     return(_file.OfType <ZipEntry>()
            .Where(e => e.IsFile && e.Name.StartsWith(GetFullPath(directory)) && e.Name.EndsWith(string.Concat(".", fileExtension)))
            .Select(e => PathInfo.Create(e.Name.Substring(_rootPathLength + 1))));
 }
Example #2
0
 public PathInfo ChangeExtension(PathInfo fileName, string extension)
 {
     return(PathInfo.Create(System.IO.Path.ChangeExtension(fileName.ToString(), extension)));
 }
Example #3
0
 public PathInfo GetFileNameWithoutExtension(PathInfo path)
 {
     return(PathInfo.Create(System.IO.Path.GetFileNameWithoutExtension(path.ToString())));
 }
Example #4
0
 public PathInfo GetDirectoryName(PathInfo filePath)
 {
     return(PathInfo.Create(System.IO.Path.GetDirectoryName(filePath.ToString())));
 }