cross-7zip - v1.2.0
    Preparing search index...

    Function sevenUnzipSync

    • Extracts files from a specified zipped file synchronously.

      Parameters

      • options: UnzipOptions

        An object containing options for the extraction process.

      Returns void

      Will throw an error if the 7-Zip executable is not found.

      import { sevenUnzipSync } from 'cross-7zip';

      function extractFilesSync(): void {
      try {
      const unzipOptions: UnzipOptions = {
      archive: 'example.7z',
      destination: './output'
      };

      sevenUnzipSync(unzipOptions);
      console.log('Extraction completed successfully.');
      } catch (error) {
      console.error('An error occurred during extraction:', error);
      }
      }

      For additional examples, see the sevenZipUnzipSync.test.ts.