/// <summary> /// Initializes a new <see cref="FileSystemInterfaceAdapter"/>, creating a copy of the input file system object. /// </summary> /// <param name="baseFileSystem">The base file system.</param> /// <param name="isHostFsRoot">Does the base file system come from the root directory of a host file system?</param> public static ReferenceCountedDisposable <FileSystemInterfaceAdapter> CreateShared( ReferenceCountedDisposable <IFileSystem> baseFileSystem, bool isHostFsRoot = false) { var adapter = new FileSystemInterfaceAdapter(baseFileSystem, isHostFsRoot); return(ReferenceCountedDisposable <FileSystemInterfaceAdapter> .Create(adapter, out adapter._selfReference)); }