Show / Hide Table of Contents

Class InMemoryFile

An in-memory implementation of a WebDAV document

Inheritance
Object
InMemoryEntry
InMemoryFile
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 InMemoryFile : InMemoryEntry, IEntityTagEntry, IDocument, IEntry

Constructors

| Improve this Doc View Source

InMemoryFile(InMemoryFileSystem, ICollection, Uri, String)

Initializes a new instance of the InMemoryFile class.

Declaration
public InMemoryFile(InMemoryFileSystem fileSystem, ICollection parent, Uri path, string name)
Parameters
Type Name Description
InMemoryFileSystem fileSystem

The file system this document belongs to

ICollection parent

The parent collection

Uri path

The root-relative path of this document

String name

The name of this document

| Improve this Doc View Source

InMemoryFile(InMemoryFileSystem, ICollection, Uri, String, Byte[])

Initializes a new instance of the InMemoryFile class.

Declaration
public InMemoryFile(InMemoryFileSystem fileSystem, ICollection parent, Uri path, string name, byte[] data)
Parameters
Type Name Description
InMemoryFileSystem fileSystem

The file system this document belongs to

ICollection parent

The parent collection

Uri path

The root-relative path of this document

String name

The name of this document

System.Byte[] data

The initial data of this document

Properties

| Improve this Doc View Source

Data

Gets or sets the underlying data

Declaration
public MemoryStream Data { get; set; }
Property Value
Type Description
MemoryStream
| Improve this Doc View Source

Length

Gets the length of the document

Declaration
public long Length { get; }
Property Value
Type Description
Int64
Implements
IDocument.Length

Methods

| Improve this Doc View Source

CopyToAsync(ICollection, String, CancellationToken)

Copies the document to a new location within the same file system

Declaration
public Task<IDocument> CopyToAsync(ICollection collection, string name, CancellationToken cancellationToken)
Parameters
Type Name Description
ICollection collection

The destination collection

String name

The new name of the document

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<IDocument>

The created document

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

CreateAsync(CancellationToken)

Overwrites the document

Declaration
public Task<Stream> CreateAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<Stream>

The stream used to write to the document

Implements
IDocument.CreateAsync(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

MoveToAsync(ICollection, String, CancellationToken)

Moves the document to a new location within the same file system

Declaration
public Task<IDocument> MoveToAsync(ICollection collection, string name, CancellationToken cancellationToken)
Parameters
Type Name Description
ICollection collection

The destination collection

String name

The new name of the document

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<IDocument>

The created document

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

OpenReadAsync(CancellationToken)

Opens the document for reading

Declaration
public Task<Stream> OpenReadAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<Stream>

The stream used to read the document

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