@vivantel/virage-core
    Preparing search index...

    Function downloadAndExtract

    • Download a .tar.gz archive from url, extract it to a subdirectory of cacheDir, and return the path to the extracted directory.

      Caching: if the directory already exists the download is skipped entirely. Pass noCache: true to force re-download.

      Parameters

      • url: string

        HTTPS (or HTTP) URL to the archive

      • cacheDir: string

        Local directory where archives are cached

      • Optionalsha256: string

        Optional expected SHA-256 hex digest for integrity check

      • noCache: boolean = false

        When true, re-download even if the extracted dir exists

      Returns Promise<{ cached: boolean; dir: string }>