@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Class DownloadAction

    Downloads a B2 file to the local filesystem.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new DownloadAction for the given relative path.

      Parameters

      • relativePath: string

        Path relative to the sync root.

      • size: number

        File size in bytes.

      • doDownload: (relativePath: string) => Promise<void>

        Callback that performs the actual download.

      Returns DownloadAction

    Properties

    relativePath: string

    Path relative to the sync root.

    size: number

    File size in bytes.

    type: "download" = ...

    The kind of action.

    Methods

    • Downloads the file (unless dryRun) and returns a 'download-done' event.

      Parameters

      • dryRun: boolean

        Whether to simulate the action without making changes.

      Returns Promise<SyncEvent>

      An async generator yielding sync progress events.