format_rel_output_path
- format_rel_output_path(root_folder: Path, file_path: Path, format_string: str, *, flatten_path: bool = True) Path [source]
Format
file_path
to a relative path for output files.- Parameters:
root_folder (Path) – Root folder of the file resides in.
file_path (Path) – Path to the file to be formatted.
format_string (str) – String with format instruction ‘file_stem’ (e.g. ‘Ui_{file_stem}.py’).
flatten_path (bool) – Whether or not to persist the original folder structure. Defaults to True
- Returns:
Relative path in respect to
root_folder
for the formatted file.- Return type:
Path