StorageInventory class

Constructors

StorageInventory({required List<StorageLocation> locations, Iterable<String> protectedRoots = const [], Iterable<String> protectedPaths = const []})

Properties

hashCode → int
The hash code for this object.
no setterinherited
locations → List<StorageLocation>
final
protectedPaths → List<String>
Registered resources that cleanup locations must not overlap.
final
protectedRoots → List<String>
Host and injected home roots that a cleanup location must never contain.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyPlan(StorageCleanupPlan plan) → Future<StoragePruneResult>
Apply only saved entries still owned and eligible in this inventory. Persisted ownership, scope and eligibility fields are never trusted.
measureEligible({Set<String> scopes = const {'build', 'shared'}}) → Future<List<StorageMeasurement>>
Measures only cleanup candidates while retaining all locations for protection checks. This avoids traversing large informational SDK data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune({Set<String> scopes = const {'build', 'shared'}, Duration? olderThan, int? maxTotalBytes, bool apply = false}) → Future<StoragePruneResult>
Select age matches first, then oldest remaining units until the eligible pool meets the budget. Preview is the default; no external tools run.
scan() → Future<StorageReport>
Scan without traversing symbolic links, including links in ancestors.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited