public static VirtualPath CreateFromNetworkPath(string path) { if (string.IsNullOrEmpty(path)) { return(NullPath.Default); } if (path.EndsWith(".zip", StringComparison.OrdinalIgnoreCase)) { return(new ZipPath(path)); } if (path.EndsWith(".tar", StringComparison.OrdinalIgnoreCase)) { return(new TarPath(path)); } string networkPath = W32FileHelpers.GetNetworkPath(path); if (Directory.Exists(networkPath)) { return(new DiskPath(networkPath)); } return(new DiskPath(path)); }
public override VirtualFile GetNetworkPath() { string networkPath = W32FileHelpers.GetNetworkPath(Path); return(new DiskFile(DiskPath, networkPath)); }