Skip to content
Snippets Groups Projects
Commit 0139315c authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Add convenience method to check if free space is below its threshold

Refers to #20
parent 90054145
No related branches found
No related tags found
No related merge requests found
...@@ -22,5 +22,13 @@ namespace ATxCommon.Serializables ...@@ -22,5 +22,13 @@ namespace ATxCommon.Serializables
/// </summary> /// </summary>
[XmlIgnore] [XmlIgnore]
public long FreeSpace { get; set; } = -1; public long FreeSpace { get; set; } = -1;
/// <summary>
/// Convenience method to check if this drive's free space is below its threshold.
/// </summary>
/// <returns>True if free space is below the threshold, false otherwise.</returns>
public bool DiskSpaceLow() {
return FreeSpace < SpaceThreshold * Conv.GigaBytes;
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment