Coal LLC Support - v1.1.0
    Preparing search index...

    Function downloadFile

    • Downloads a file over HTTPS, following redirects, and hashes it on the way.

      Parameters

      • url: string

        URL of the file.

      • destination: string

        Absolute path the file is written to.

      • OptionalonProgress: (percent: number) => void

        Called with the progress in whole percent whenever it changes, if the size is known.

      Returns Promise<DownloadedFile>

      A promise resolving to the size and SHA-256 of the written file.