Class FileItem
- Namespace
- Archiver.App.Core
- Assembly
- Archiver.App.Core.dll
One top-level path in the pending archive-creation/extraction list, with its size and CRC-32 computed in the background. Disposing it (the row was removed) stops that work.
public sealed class FileItem : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging, IDisposable
- Inheritance
-
FileItem
- Implements
- Inherited Members
Properties
Crc32
[ObservableProperty]
[ExcludeFromCodeCoverage]
public uint? Crc32 { get; set; }
Property Value
- uint?
Crc32Display
[ObservableProperty]
[ExcludeFromCodeCoverage]
public string Crc32Display { get; set; }
Property Value
Crc32Ready
Completes when Crc32 and Crc32Display are final (at once for a folder). Never faults: an unreadable file leaves Crc32 null.
public Task Crc32Ready { get; }
Property Value
FileCount
Files in this item: 1 for a file, the folder's file count once TotalsReady completes (0 when it could not be measured).
public int FileCount { get; }
Property Value
FullPath
public string FullPath { get; }
Property Value
IsFolder
public bool IsFolder { get; }
Property Value
Modified
public DateTime Modified { get; }
Property Value
ModifiedDisplay
public string ModifiedDisplay { get; }
Property Value
Name
public string Name { get; }
Property Value
Size
[ObservableProperty]
[ExcludeFromCodeCoverage]
public string Size { get; set; }
Property Value
SizeBytes
[ObservableProperty]
[ExcludeFromCodeCoverage]
public long SizeBytes { get; set; }
Property Value
TotalsReady
Completes when SizeBytes and FileCount are final. Never faults: a failed or stopped walk leaves SizeBytes at -1.
public Task TotalsReady { get; }
Property Value
Type
public string Type { get; }
Property Value
Methods
Dispose()
Stops the size walk and a CRC-32 read that has not started yet.
public void Dispose()
FormatSize(long)
Formats a byte count as B/KB/MB/GB for display, in the App's language.
public static string FormatSize(long bytes)
Parameters
byteslong
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryCreate(string)
Creates the item, or returns null when path cannot be read.
public static FileItem? TryCreate(string path)
Parameters
pathstring