/// <exception cref="URISyntaxException"/> public ChRootedFs(AbstractFileSystem fs, Path theRoot) : base(fs.GetUri(), fs.GetUri().GetScheme(), fs.GetUri().GetAuthority() != null, fs.GetUriDefaultPort()) { myFs = fs; myFs.CheckPath(theRoot); chRootPathPart = new Path(myFs.GetUriPath(theRoot)); chRootPathPartString = chRootPathPart.ToUri().GetPath(); /* * We are making URI include the chrootedPath: e.g. file:///chrootedPath. * This is questionable since Path#makeQualified(uri, path) ignores * the pathPart of a uri. Since this class is internal we can ignore * this issue but if we were to make it external then this needs * to be resolved. */ // Handle the two cases: // scheme:/// and scheme://authority/ myUri = new URI(myFs.GetUri().ToString() + (myFs.GetUri().GetAuthority() == null ? string.Empty : Path.Separator) + Runtime.Substring(chRootPathPart.ToUri( ).GetPath(), 1)); base.CheckPath(theRoot); }
public override void CheckPath(Path path) { myFs.CheckPath(path); }