Relativizes a finding file path against root_dir using forward slashes.

If root_dir is None, or file_path is None, or file_path is not within root_dir, file_path is returned unchanged. Supports both filesystem-resolved paths and POSIX container path strings.

Methods

relativize_finding_path

relativize_finding_path(file_path: Optional, root_dir: Optional]) -> Optional[str]

Relativizes a finding file path against root_dir using forward slashes.

If root_dir is None, or file_path is None, or file_path is not within root_dir, file_path is returned unchanged. Supports both filesystem-resolved paths and POSIX container path strings.

ParameterTypeDescription
file_pathOptional
root_dirOptional]

Generated with Flude

Copyright © 2026