IFileReference

Namespace: Proffer.Storage

A reference of a stored file at a given path.

public interface IFileReference : IPrivateFileReference

Implements IPrivateFileReference

Properties

PublicUrl

Gets the public URL.

public abstract string PublicUrl { get; }

Property Value

String

Properties

Gets the properties.

public abstract IFileProperties Properties { get; }

Property Value

IFileProperties

Methods

ReadToStreamAsync(Stream)

Reads the file content into the given stream.

Task ReadToStreamAsync(Stream targetStream)

Parameters

targetStream Stream
The target stream.

Returns

Task
A task that represents the asynchronous operation.

ReadAsync()

Reads the file content.

ValueTask<Stream> ReadAsync()

Returns

ValueTask<Stream>
A containing the file content.

ReadAllTextAsync()

Reads the file content.

ValueTask<string> ReadAllTextAsync()

Returns

ValueTask<String>
A containing the file content.

ReadAllBytesAsync()

Reads the file content.

ValueTask<Byte[]> ReadAllBytesAsync()

Returns

ValueTask<Byte[]>
A containing the file content.

DeleteAsync()

Deletes the file.

Task DeleteAsync()

Returns

Task
A task that represents the asynchronous operation.

UpdateAsync(Stream)

Updates the file content with the given Stream.

Task UpdateAsync(Stream stream)

Parameters

stream Stream
The new file content.

Returns

Task
A task that represents the asynchronous operation.

SavePropertiesAsync()

Saves the file properties.

Task SavePropertiesAsync()

Returns

Task
A task that represents the asynchronous operation.

GetSharedAccessSignature(ISharedAccessPolicy)

Gets a shared access signature.

ValueTask<string> GetSharedAccessSignature(ISharedAccessPolicy policy)

Parameters

policy ISharedAccessPolicy
The policy.

Returns

ValueTask<String>
A shared access signature to read file.

FetchProperties()

Fetches the file properties.

Task FetchProperties()

Returns

Task
A task that represents the asynchronous operation.