-
Notifications
You must be signed in to change notification settings - Fork 1
ZipFile Class
개발자 윤군 edited this page Jan 12, 2021
·
4 revisions
This class like C# ZipFile
Provides static methods for creating, extracting, and opening zip archives.
Creates a zip archive that contains the files and directories from the specified directory.
Source: libzip.ts:408
| Type | Name | Description | Necessary |
|---|---|---|---|
| String | src | Source directory | TRUE |
| String | dst | Destination zip file name | TRUE |
| String | passwd | Zip file password | FLASE |
import { ZipFile } from 'libzip';
ZipFile.CreateFromDirectory('src path', 'dst path.zip');Extracts all the files in the specified zip archive to a directory on the file system.
Source: libzip.ts:429
| Type | Name | Description | Necessary |
|---|---|---|---|
| String | src | Extract target zip file | TRUE |
| String | dst | Destination directory name | TRUE |
| String | passwd | Zip file password | FLASE |
import { ZipFile } from 'libzip';
ZipFile.ExtractToDirectory('src path.zip', 'dst path');Opens a zip archive at the specified path.
Source: libzip.ts:452
| Type | Name | Description | Necessary |
|---|---|---|---|
| String | src | Open target zip file | TRUE |
import { ZipFile, ZipArchive } from 'libzip';
const archive: ZipArchive = ZipFile.Open('zip file path.zip');
/* do something */