QueryContext class allows you to query whether filesystem or network operations would be permitted by a given capability set. This is useful for:
- Testing your sandbox configuration before applying it
- Debugging permission issues
- Building tools that preview sandbox effects
Constructor
Methods
queryPath
queryNetwork
QueryResultInfo
The result of a query operation.Properties
The reason for the result. Possible values:For allowed results:
"granted_path"— Access granted by a filesystem capability"network_allowed"— Network access is not blocked
"path_not_granted"— No capability covers this path"insufficient_access"— Path is covered but with insufficient permissions"network_blocked"— Network access has been blocked