Class DownloadedFile
- Namespace
- CivitaiSharp.Tools.Downloads
- Assembly
- CivitaiSharp.Tools.dll
Result of a file download operation containing the file path and metadata.
public sealed record DownloadedFile : IEquatable<DownloadedFile>
- Inheritance
-
DownloadedFile
- Implements
- Inherited Members
Constructors
DownloadedFile(string, long, bool, string?)
Result of a file download operation containing the file path and metadata.
public DownloadedFile(string FilePath, long SizeBytes, bool IsVerified, string? ComputedHash)
Parameters
FilePathstringThe absolute path to the downloaded file.
SizeByteslongThe size of the downloaded file in bytes.
IsVerifiedboolTrue if the file hash was verified against an expected value and matched. False if verification was not performed or was skipped.
ComputedHashstringThe computed hash value if hashing was performed, or null if no hash was computed. Always lowercase hexadecimal format.
Properties
ComputedHash
The computed hash value if hashing was performed, or null if no hash was computed. Always lowercase hexadecimal format.
public string? ComputedHash { get; init; }
Property Value
FilePath
The absolute path to the downloaded file.
public string FilePath { get; init; }
Property Value
IsVerified
True if the file hash was verified against an expected value and matched. False if verification was not performed or was skipped.
public bool IsVerified { get; init; }
Property Value
SizeBytes
The size of the downloaded file in bytes.
public long SizeBytes { get; init; }