Show / Hide Table of Contents

Class InMemoryDirectory

An in-memory implementation of a WebDAV collection

Inheritance
Object
InMemoryEntry
InMemoryDirectory
Inherited Members
InMemoryEntry.Name
InMemoryEntry.FileSystem
InMemoryEntry.Parent
InMemoryEntry.Path
InMemoryEntry.LastWriteTimeUtc
InMemoryEntry.CreationTimeUtc
InMemoryEntry.ETag
InMemoryEntry.InMemoryFileSystem
InMemoryEntry.InMemoryParent
InMemoryEntry.UpdateETagAsync(CancellationToken)
InMemoryEntry.SetLastWriteTimeUtcAsync(DateTime, CancellationToken)
InMemoryEntry.SetCreationTimeUtcAsync(DateTime, CancellationToken)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace:FubarDev.WebDavServer.FileSystem.InMemory
Assembly:FubarDev.WebDavServer.FileSystem.InMemory.dll
Syntax
public class InMemoryDirectory : InMemoryEntry, IEntityTagEntry, ICollection, IEntry, IRecusiveChildrenCollector

Constructors

| Improve this Doc View Source

InMemoryDirectory(InMemoryFileSystem, ICollection, Uri, String, Boolean)

Initializes a new instance of the InMemoryDirectory class.

Declaration
public InMemoryDirectory([NotNull] InMemoryFileSystem fileSystem, [CanBeNull] ICollection parent, [NotNull] Uri path, [NotNull] string name, bool isRoot = false)
Parameters
Type Name Description
InMemoryFileSystem fileSystem

The file system this collection belongs to

ICollection parent

The parent collection

Uri path

The root-relative path of this collection

String name

The name of the collection

Boolean isRoot

Is this the file systems root directory?

Methods

| Improve this Doc View Source

CreateCollection(String)

Creates a new collection

Declaration
public InMemoryDirectory CreateCollection(string name)
Parameters
Type Name Description
String name

The name of the collection to create

Returns
Type Description
InMemoryDirectory

The created collection

Exceptions
Type Condition
UnauthorizedAccessException

The file system is read-only

IOException

Document or collection with the same name already exists

| Improve this Doc View Source

CreateCollectionAsync(String, CancellationToken)

Creates a child collection

Declaration
public Task<ICollection> CreateCollectionAsync(string name, CancellationToken ct)
Parameters
Type Name Description
String name

The name of the new collection

CancellationToken ct

The cancellation token

Returns
Type Description
Task<ICollection>

The new collection

Implements
ICollection.CreateCollectionAsync(String, CancellationToken)
| Improve this Doc View Source

CreateDocument(String)

Creates a document

Declaration
public InMemoryFile CreateDocument(string name)
Parameters
Type Name Description
String name

The name of the document to create

Returns
Type Description
InMemoryFile

The created document

Exceptions
Type Condition
UnauthorizedAccessException

The file system is read-only

IOException

Document or collection with the same name already exists

| Improve this Doc View Source

CreateDocumentAsync(String, CancellationToken)

Creates a document with the given name

Declaration
public Task<IDocument> CreateDocumentAsync(string name, CancellationToken ct)
Parameters
Type Name Description
String name

The name of the new document

CancellationToken ct

The cancellation token

Returns
Type Description
Task<IDocument>

The created document

Implements
ICollection.CreateDocumentAsync(String, CancellationToken)
| Improve this Doc View Source

DeleteAsync(CancellationToken)

Deletes this entry

Declaration
public override Task<DeleteResult> DeleteAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<DeleteResult>

The result of the delete operation

Overrides
InMemoryEntry.DeleteAsync(CancellationToken)
Implements
IEntry.DeleteAsync(CancellationToken)
| Improve this Doc View Source

GetChildAsync(String, CancellationToken)

Gets the child entry with the given name

Declaration
public Task<IEntry> GetChildAsync(string name, CancellationToken ct)
Parameters
Type Name Description
String name

The name of the child entry to get

CancellationToken ct

The cancellation token

Returns
Type Description
Task<IEntry>

The found entry (or null)

Implements
ICollection.GetChildAsync(String, CancellationToken)
| Improve this Doc View Source

GetChildrenAsync(CancellationToken)

Gets all child entries

Declaration
public Task<IReadOnlyCollection<IEntry>> GetChildrenAsync(CancellationToken ct)
Parameters
Type Name Description
CancellationToken ct

The cancellation token

Returns
Type Description
Task<IReadOnlyCollection<IEntry>>

The found entries

Implements
ICollection.GetChildrenAsync(CancellationToken)
| Improve this Doc View Source

GetEntries(Int32)

Gets all child entries up to the depth of maxDepth

Declaration
public IAsyncEnumerable<IEntry> GetEntries(int maxDepth)
Parameters
Type Name Description
Int32 maxDepth

The maximum depth (MaxValue as infinity)

Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<IEntry>

All found child entries

Implements
IRecusiveChildrenCollector.GetEntries(Int32)
  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX