Class InMemoryFileSystem
An in-memory file system implementation
Inherited Members
Namespace:FubarDev.WebDavServer.FileSystem.InMemory
Assembly:FubarDev.WebDavServer.FileSystem.InMemory.dll
Syntax
public class InMemoryFileSystem : IFileSystem, IMountPointManager, IMountPointProvider
Constructors
| Improve this Doc View SourceInMemoryFileSystem(ICollection, IPathTraversalEngine, ISystemClock, ILockManager, IPropertyStoreFactory)
Initializes a new instance of the InMemoryFileSystem class.
Declaration
public InMemoryFileSystem([CanBeNull] ICollection mountPoint, [NotNull] IPathTraversalEngine pathTraversalEngine, [NotNull] ISystemClock systemClock, ILockManager lockManager = null, IPropertyStoreFactory propertyStoreFactory = null)
Parameters
Type | Name | Description |
---|---|---|
ICollection | mountPoint | The mount point where this file system should be included |
IPathTraversalEngine | pathTraversalEngine | The engine to traverse paths |
ISystemClock | systemClock | Interface for the access to the systems clock |
ILockManager | lockManager | The global lock manager |
IPropertyStoreFactory | propertyStoreFactory | The store for dead properties |
Properties
| Improve this Doc View SourceIsReadOnly
Gets or sets a value indicating whether the file system is read-only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
LockManager
Gets the global lock manager
Declaration
public ILockManager LockManager { get; }
Property Value
Type | Description |
---|---|
ILockManager |
Implements
| Improve this Doc View SourceMountPoints
Gets all mount points
Declaration
public IEnumerable<Uri> MountPoints { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Uri> |
Implements
| Improve this Doc View SourcePropertyStore
Gets the property store to be used for the file system.
Declaration
public IPropertyStore PropertyStore { get; }
Property Value
Type | Description |
---|---|
IPropertyStore |
Implements
| Improve this Doc View SourceRoot
Gets the root collection
Declaration
public AsyncLazy<ICollection> Root { get; }
Property Value
Type | Description |
---|---|
AsyncLazy<ICollection> |
Implements
| Improve this Doc View SourceRootCollection
Gets the root collection
Declaration
[NotNull]
public InMemoryDirectory RootCollection { get; }
Property Value
Type | Description |
---|---|
InMemoryDirectory |
SupportsRangedRead
Gets a value indicating whether the file system allows seeking and partial reading.
Declaration
public bool SupportsRangedRead { get; }
Property Value
Type | Description |
---|---|
Boolean |
Implements
| Improve this Doc View SourceSystemClock
Gets the systems clock
Declaration
public ISystemClock SystemClock { get; }
Property Value
Type | Description |
---|---|
ISystemClock |
Methods
| Improve this Doc View SourceMount(Uri, IFileSystem)
Mount a source to a destination
Declaration
public void Mount(Uri source, IFileSystem destination)
Parameters
Type | Name | Description |
---|---|---|
Uri | source | The source path |
IFileSystem | destination | The destination file system |
Implements
| Improve this Doc View SourceSelectAsync(String, CancellationToken)
Finds an entry for a given path
Declaration
public Task<SelectionResult> SelectAsync(string path, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
String | path | The root-relative path |
CancellationToken | ct | The cancellation token |
Returns
Type | Description |
---|---|
Task<SelectionResult> | The result of the search operation |
Implements
| Improve this Doc View SourceTryGetMountPoint(Uri, out IFileSystem)
Try to get a mount point for a given path
Declaration
public bool TryGetMountPoint(Uri path, out IFileSystem destination)
Parameters
Type | Name | Description |
---|---|---|
Uri | path | The path to get the destination file system for |
IFileSystem | destination | The destination file system |
Returns
Type | Description |
---|---|
Boolean | true when there is a destination file system for a path |
Implements
| Improve this Doc View SourceUnmount(Uri)
Removes a mount from the source
Declaration
public void Unmount(Uri source)
Parameters
Type | Name | Description |
---|---|---|
Uri | source | The source path |