validate_within_dir
Function
This function is defined in the workspace module.Validate that a path is contained within an allowed root directory.
Signature
Parameters
Path
required
Path to validate
Path
required
Root directory that must contain the path
Returns
bool
True if path is within allowed_root, False otherwise
Uses
relative_topath.resolveallowed_root.resolve
Source
View on GitHub
praisonaiagents/workspace/__init__.py at line 153
