get_validated_relative_path#

langchain_community.tools.file_management.utils.get_validated_relative_path(root: Path, user_path: str) Path[source]#

Resolve a relative path, raising an error if not within the root directory.

Parameters:
  • root (Path)

  • user_path (str)

Return type:

Path