Skip to content

AxisDownloadedFile

Class in Oadm.Sdk.Plugins · Oadm.Sdk.dll

A downloaded file of IAxisDownloads; dispose it when the task no longer needs it.

public sealed class AxisDownloadedFile : IAsyncDisposable

Implements IAsyncDisposable

AxisDownloadedFile(string path, long length, bool fromCache, Func<ValueTask>? release = null)

Parameters

  • path: The full path of the file on the server; read only.
  • length: Its size in bytes.
  • fromCache: True when no download was needed.
  • release: Called once when the handle is disposed.
bool FromCache { get; }

True when the file came from the cache.

long Length { get; }

The size in bytes.

string Path { get; }

The full path of the file; open it for reading only.

ValueTask DisposeAsync()

Lets the host delete the file once no task uses it and its time in the cache is over.

Stream OpenRead()

Opens the file for reading.