diff --git a/ATxCommon/StorageStatus.cs b/ATxCommon/StorageStatus.cs index f6002dd0bfed9b2917c329d22f075932f5b663b2..f083aca376f515ed7753161dd8e2be619d5c79e5 100644 --- a/ATxCommon/StorageStatus.cs +++ b/ATxCommon/StorageStatus.cs @@ -48,6 +48,21 @@ namespace ATxCommon } } + /// <summary> + /// Check if free space on all configured drives is above their threshold. + /// </summary> + /// <returns>False if any of the drives is below its threshold, true otherwise.</returns> + public bool AllDrivesAboveThreshold() { + UpdateFreeSpace(); + foreach (var drive in _drives) { + if (drive.DiskSpaceLow()) { + return false; + } + } + + return true; + } + /// <summary> /// Get a dictionary of expired directories from the grace location. /// </summary>