zipDirectory method
Zips a dir
to a Zip file asynchronously.
Implementation
Future<void> zipDirectory(Directory dir,
{String? filename,
int? level,
bool followLinks = true,
void Function(double)? onProgress,
DateTime? modified,
ZipFileProgress? filter}) async {
create(
_composeZipDirectoryPath(dir: dir, filename: filename),
level: level ??= gzip,
modified: modified,
);
await addDirectory(dir,
includeDirName: false,
level: level,
followLinks: followLinks,
onProgress: onProgress,
filter: filter);
await close();
}