An object containing options for the extraction process.
import { UnzipOptions, sevenUnzip } from 'cross-7zip';
async function extractFiles(): Promise<void> {
try {
const unzipOptions: UnzipOptions = {
archive: 'example.7z',
destination: './output'
};
await sevenUnzip(unzipOptions);
console.log('Extraction completed successfully.');
} catch (error) {
console.error('An error occurred during extraction:', error);
}
}
For additional examples, see the sevenZipUnzip.test.ts.
Extracts files from a specified zipped file asynchronously.