public override INode Find(INodeResolver resolver, string uri, NodeType nodeType, FileSystemOptions options) { var address = LayeredNodeAddress.Parse(uri); if (address.Port >= 0 || address.UserName != "" || address.Password != "" || address.ServerName != "") { throw new MalformedUriException(uri, "Network & Authentication information not permitted"); } if (nodeType.Is(typeof(IFile))) { var uri2 = address.InnerUri; if (StringUriUtils.ContainsQuery(uri2)) { uri2 += "&shadow=true"; } else { uri2 += "?shadow=true"; } return(resolver.Resolve(uri2, nodeType)); } return(resolver.Resolve(address.InnerUri)); }
public override INode Resolve(string uri, NodeType nodeType, AddressScope scope, FileSystemOptions options) { bool success; IFileSystem fileSystem; var address = LayeredNodeAddress.Parse(uri); lock (this.fileSystemCache) { success = this.fileSystemCache.TryGetValue(address.RootUri, out fileSystem); } if (!success) { var networkUri = String.Format("netvfs://{0}[" + uri + "]/", this.ipAddress); fileSystem = FileSystemManager.GetManager().ResolveDirectory(networkUri).FileSystem; lock (this.fileSystemCache) { this.fileSystemCache.Add(address.RootUri, fileSystem); } } return(fileSystem.Resolve(address.PathAndQuery)); }
protected override INodeAddress ParseUri(string uri) { return(LayeredNodeAddress.Parse(uri)); }
public ZipFileSystem(IFile file, FileSystemOptions options) : this(LayeredNodeAddress.Parse("zip://[" + file.Address.Uri + "]"), file, options) { }