Skip to content

Commit

Permalink
[Zip] Fixed selected files
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSte committed Aug 30, 2023
1 parent cea3bfd commit 4064d8a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/skit/zip.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import subprocess

def unzip_specific_files(zip_file_path, destination_directory, specific_files=None):
def unzip_specific_files(
zip_file_path,
destination_directory,
specific_files=None
):
"""
Unzips specific files or folders from a ZIP archive.
Expand All @@ -13,7 +17,12 @@ def unzip_specific_files(zip_file_path, destination_directory, specific_files=No
```python
zip_file_path = "/path/to/archive.zip"
destination_directory = "/path/to/destination/"
specific_files = ["file1", "file2", "folder1/"]
specific_files = [
"file1.txt",
"file2.csv",
"folder1/*"
]
unzip_specific_files(zip_file_path, destination_directory, specific_files)
```
"""
Expand Down

0 comments on commit 4064d8a

Please sign in to comment.