Beispiel #1
0
        public IFileSystem GetFileSystem(string hostPath, string path, out string basePath)
        {
            IFileSystem fileSystem = null;

            if (path.StartsWith("zip://"))
            {
                string baseInFile;
                var    filePath = GetFilePath(new Uri(path, UriKind.RelativeOrAbsolute), out baseInFile);
                filePath = Path.GetFullPath(!Path.IsPathRooted(filePath) ? Path.Combine(hostPath, filePath) : filePath);

                fileSystem = CreateZipFileSystem(filePath, baseInFile);
                basePath   = string.Empty;
            }
            else
            {
                basePath = PathInfo.Combine(PathInfo.Create(hostPath), PathInfo.Create(path)).ToString();
                basePath = string.Empty;
            }
            return(fileSystem);
        }
Beispiel #2
0
 public PathInfo Combine(params PathInfo[] parts)
 {
     return(PathInfo.Combine(parts));
 }