FilePermissionChecker class

Checks file-system permissions against sandbox rules and protected paths.

Constructors

FilePermissionChecker({required List<String> allowedPaths, List<String>? protectedPaths, required PermissionRuleSet ruleSet, PermissionCache? cache})

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

checkDelete(String path) PermissionDecision
Check delete permission for a file path.
checkRead(String path) PermissionDecision
Check read permission for a file path.
checkWrite(String path) PermissionDecision
Check write permission for a file path.
expandAllowedPaths(List<PermissionRule> rules) List<String>
Expand allowed paths from a set of rules that have file scope.
isInSandbox(String path) bool
Whether the given path falls inside any allowed sandbox path.
isProtectedPath(String path) bool
Whether the given path is a protected system path.
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