We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ada7502 commit ddc5fa0Copy full SHA for ddc5fa0
zip_creator.py
@@ -0,0 +1,15 @@
1
+import zipfile
2
+from pathlib import Path
3
+
4
+def create_archive(file_paths, to_folder_path):
5
+ path = Path(to_folder_path, "compress.zip")
6
7
+ with zipfile.ZipFile(path, "w") as archive:
8
+ for file_path in file_paths:
9
+ file_path = Path(file_path)
10
+ archive.write(file_path, arcname=file_path.name)
11
12
13
+def unzipper(archive_path, to_folder_path):
14
+ with zipfile.ZipFile(archive_path, "r") as archive:
15
+ archive.extractall(to_folder_path)
0 commit comments