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 : IAsyncDisposableImplements IAsyncDisposable
Constructors
Section titled “Constructors”AxisDownloadedFile
Section titled “AxisDownloadedFile”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.
Properties
Section titled “Properties”FromCache
Section titled “FromCache”bool FromCache { get; }True when the file came from the cache.
Length
Section titled “Length”long Length { get; }The size in bytes.
string Path { get; }The full path of the file; open it for reading only.
Methods
Section titled “Methods”DisposeAsync
Section titled “DisposeAsync”ValueTask DisposeAsync()Lets the host delete the file once no task uses it and its time in the cache is over.
OpenRead
Section titled “OpenRead”Stream OpenRead()Opens the file for reading.