Interface CreateArchiveController
interface CreateArchiveController {
addFile(
name: string,
data: DataSource,
modTime: ValidZipDateTimeSources | null,
options?: { compressionLevel?: number },
): Promise<void>;
addFolder(
fullPath: string,
modTime: ValidZipDateTimeSources | null,
): Promise<void>;
hasEntry(fullpath: string): boolean;
}
addFile(
name: string,
data: DataSource,
modTime: ValidZipDateTimeSources | null,
options?: { compressionLevel?: number },
): Promise<void>;
addFolder(
fullPath: string,
modTime: ValidZipDateTimeSources | null,
): Promise<void>;
hasEntry(fullpath: string): boolean;
}
Methods
add File
- addFile(
name: string,
data: DataSource,
modTime: ValidZipDateTimeSources | null,
options?: { compressionLevel?: number },
): Promise<void>Parameters
- name: string
- data: DataSource
- modTime: ValidZipDateTimeSources | null
Optionaloptions: { compressionLevel?: number }
Returns Promise<void>
add Folder
Adds a folder to the archive, returns when the folder data has been streamed to the archive stream
Parameters
- fullPath: string
- modTime: ValidZipDateTimeSources | null
Returns Promise<void>
has Entry
Test if an entry with the given path has already been added to the archive
Parameters
- fullpath: string
Returns boolean
Adds a file to the archive, returns when the file data has been streamed to the archive stream