Record Class FileSystemPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.api.isolation.FileSystemPolicy
- Record Components:
denyAllByDefault- whether unmatched paths are deniedrules- ordered immutable rules
Filesystem policy for J7M-provided access checks and process working directory validation.
The policy is immutable. It normalizes paths before evaluation and denies traversal that escapes an allowed root. Symlink behavior depends on the provider and host filesystem; providers must document whether they resolve links before access.
-
Constructor Summary
ConstructorsConstructorDescriptionFileSystemPolicy(boolean denyAllByDefault, List<FileSystemRule> rules) Creates a validated filesystem policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic FileSystemPolicydenyAll()Creates a deny-all filesystem policy.booleanReturns the value of thedenyAllByDefaultrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.rules()Returns the value of therulesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FileSystemPolicy
Creates a validated filesystem policy.
-
-
Method Details
-
denyAll
Creates a deny-all filesystem policy.- Returns:
- deny-all policy
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
denyAllByDefault
public boolean denyAllByDefault()Returns the value of thedenyAllByDefaultrecord component.- Returns:
- the value of the
denyAllByDefaultrecord component
-
rules
-