Class InMemoryEntry
Am in-memory implementation of a WebDAV entry (collection or document)
Inherited Members
Namespace:FubarDev.WebDavServer.FileSystem.InMemory
Assembly:FubarDev.WebDavServer.FileSystem.InMemory.dll
Syntax
public abstract class InMemoryEntry : IEntry, IEntityTagEntry
Constructors
| Improve this Doc View SourceInMemoryEntry(InMemoryFileSystem, ICollection, Uri, String)
Initializes a new instance of the InMemoryEntry class.
Declaration
protected InMemoryEntry(InMemoryFileSystem fileSystem, ICollection parent, Uri path, string name)
Parameters
Type | Name | Description |
---|---|---|
InMemoryFileSystem | fileSystem | The file system this entry belongs to |
ICollection | parent | The parent collection |
Uri | path | The root-relative path of this entry |
String | name | The name of the entry |
Properties
| Improve this Doc View SourceCreationTimeUtc
Gets the time this entry was created
Declaration
public DateTime CreationTimeUtc { get; protected set; }
Property Value
Type | Description |
---|---|
DateTime |
Implements
| Improve this Doc View SourceETag
Gets the EntityTag for a IDocument or ICollection
Declaration
public EntityTag ETag { get; protected set; }
Property Value
Type | Description |
---|---|
EntityTag |
Implements
| Improve this Doc View SourceFileSystem
Gets the file system of this entry
Declaration
public IFileSystem FileSystem { get; }
Property Value
Type | Description |
---|---|
IFileSystem |
Implements
| Improve this Doc View SourceInMemoryFileSystem
Gets the file system
Declaration
[NotNull]
protected InMemoryFileSystem InMemoryFileSystem { get; }
Property Value
Type | Description |
---|---|
InMemoryFileSystem |
InMemoryParent
Gets the parent collection
Declaration
[CanBeNull]
protected InMemoryDirectory InMemoryParent { get; }
Property Value
Type | Description |
---|---|
InMemoryDirectory |
LastWriteTimeUtc
Gets the last time this entry was modified
Declaration
public DateTime LastWriteTimeUtc { get; protected set; }
Property Value
Type | Description |
---|---|
DateTime |
Implements
| Improve this Doc View SourceName
Gets the name of the entry
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Implements
| Improve this Doc View SourceParent
Gets the collection that contains this entry
Declaration
public ICollection Parent { get; }
Property Value
Type | Description |
---|---|
ICollection |
Implements
Remarks
This property can be null
when this entry is the root collection.
Path
Gets the path of the entry
Declaration
public Uri Path { get; }
Property Value
Type | Description |
---|---|
Uri |
Implements
Methods
| Improve this Doc View SourceDeleteAsync(CancellationToken)
Deletes this entry
Declaration
public abstract 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 |
Implements
| Improve this Doc View SourceSetCreationTimeUtcAsync(DateTime, CancellationToken)
Sets the creation time
Declaration
public Task SetCreationTimeUtcAsync(DateTime creationTime, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DateTime | creationTime | The new creation time |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task | The async task |
Implements
| Improve this Doc View SourceSetLastWriteTimeUtcAsync(DateTime, CancellationToken)
Sets the last write time
Declaration
public Task SetLastWriteTimeUtcAsync(DateTime lastWriteTime, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DateTime | lastWriteTime | The new last write time |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task | The async task |
Implements
| Improve this Doc View SourceUpdateETagAsync(CancellationToken)
Enforces the update of an EntityTag
Declaration
public Task<EntityTag> UpdateETagAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<EntityTag> | The new EntityTag |
Implements
Remarks
This is usually called when the IEntry properties were changed.