示例#1
0
        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));
        }
示例#2
0
        public override VirtualFile GetNetworkPath()
        {
            string networkPath = W32FileHelpers.GetNetworkPath(Path);

            return(new DiskFile(DiskPath, networkPath));
        }