Skip to main content

resolve

Method
This is a method of the Workspace class in the workspace module.
Resolve a path against the workspace root with security checks.

Signature

Parameters

str \| Path
required
Relative or absolute path to resolve

Returns

Path
Absolute path within workspace

Exceptions

If path escapes workspace or contains traversal attempts

Uses

  • Path
  • has_traversal_component
  • ValueError
  • path.is_absolute
  • path.resolve
  • resolve
  • resolved.relative_to

Used By

Source

View on GitHub

praisonaiagents/workspace/__init__.py at line 68