SafetyUtils class
Safety utilities for validating deletions.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isPathAllowed(
String targetPath, List< String> allowedRoots, List<String> globalCachePaths) → bool - Validates that a path is within allowed project roots.
-
shouldPruneDirectory(
String dirName) → bool - Checks if a directory name should be pruned during scanning.
-
validateDeletion(
CacheTarget target, String projectRoot) → String? - Validates that a path is safe to delete. Returns null if safe, or an error message if not.
Constants
-
safeTargetTypes
→ const Set<
String> - Known safe cache target types (allowlist).