protect_from_overwrite
- glotaran.plugin_system.io_plugin_utils.protect_from_overwrite(path: str | os.PathLike[str], *, allow_overwrite: bool = False) None [source]
Raise FileExistsError if files already exists and allow_overwrite isn’t True.
- Parameters
- Raises
FileExistsError – If path points to an existing file.
FileExistsError – If path points to an existing folder which is not empty.