ospx.utils.zip¶
Functions
|
Add a single file and its ascii content. |
|
Read a single file. |
|
Remove files. |
|
Rename files. |
|
Substitute a given string in all files matching the passed file name pattern. |
|
Update the ascii content of a single file. |
- ospx.utils.zip.add_file_content_to_zip(zip_file: Path, file_name: str, file_content: str) ZipFile | None ¶
Add a single file and its ascii content.
Belongs to zip functions.
- ospx.utils.zip.read_file_content_from_zip(zip_file: Path, file_name: str) str | None ¶
Read a single file.
Belongs to zip functions
- ospx.utils.zip.remove_files_from_zip(zip_file: Path, *file_names: str) ZipFile | None ¶
Remove files.
Belongs to zip functions.
- ospx.utils.zip.rename_file_in_zip(zip_file: Path, file_name: str, new_file_name: str) ZipFile | None ¶
Rename files.
Belongs to zip functions.
- ospx.utils.zip.substitute_text_in_zip(zip_file: Path, file_name_pattern: str = '', subst: tuple[str, str] = ('', '')) ZipFile | None ¶
Substitute a given string in all files matching the passed file name pattern.
Belongs to zip functions.
- ospx.utils.zip.update_file_content_in_zip(zip_file: Path, file_name: str, file_content: str) ZipFile | None ¶
Update the ascii content of a single file.
Belongs to zip functions.