chdir_context

glotaran.utils.io.chdir_context(folder_path: StrOrPath) Generator[Path, None, None][source]

Context manager to change directory to folder_path.

Parameters:

folder_path (StrOrPath) – Path to change to.

Yields:

Generator[Path, None, None] – Resolved path of folder_path.

Raises:

ValueError – If folder_path is an existing file.