Table of Contents

Class FileSystemAssetSource

Namespace
EncDotNet.S100.Core
Assembly
EncDotNet.S100.Core.dll

An asset source backed by a local file system directory.

public sealed class FileSystemAssetSource : IAssetSource, IDisposable, IAsyncDisposable
Inheritance
FileSystemAssetSource
Implements
Inherited Members

Properties

RootPath

The full path of the root directory relative paths resolve against.

public string RootPath { get; }

Property Value

string

Methods

Create(string)

Creates a FileSystemAssetSource rooted at the given directory.

public static FileSystemAssetSource Create(string directoryPath)

Parameters

directoryPath string

The path to the root directory.

Returns

FileSystemAssetSource

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

OpenAsync(string, CancellationToken)

Opens a readable stream for the asset at the given relative path within the source.

public Task<Stream> OpenAsync(string relativePath, CancellationToken cancellationToken = default)

Parameters

relativePath string

A forward-slash separated relative path to the asset.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<Stream>