public ChrootFileSystemParam(FileSystem underlayFileSystem, string physicalRootDirectory, FileSystemMode mode = FileSystemMode.Default) : base(underlayFileSystem, mode) { physicalRootDirectory = underlayFileSystem.NormalizePath(physicalRootDirectory); physicalRootDirectory = underlayFileSystem.PathParser.NormalizeDirectorySeparatorAndCheckIfAbsolutePath(physicalRootDirectory); this.PhysicalRootDirectory = physicalRootDirectory; }
string NormalizeSubPath(string subpath, NormalizePathOption options) { Debug.Assert(Parser.Style.EqualsAny(FileSystemStyle.Linux, FileSystemStyle.Mac)); subpath = Parser.NormalizeDirectorySeparatorIncludeWindowsBackslash(subpath); if (Parser.IsAbsolutePath(subpath) == false) { subpath = "/" + subpath; } subpath = Parser.NormalizeUnixStylePathWithRemovingRelativeDirectoryElements(subpath); subpath = FileSystem.NormalizePath(subpath, options); return(subpath); }