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

    Class CopyAction

    Server-side copies a B2 file to a new key within the same or different bucket.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new CopyAction for the given relative path.

      Parameters

      • relativePath: string

        Path relative to the sync root.

      • size: number

        File size in bytes.

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

        Callback that performs the server-side copy.

      Returns CopyAction

    Properties

    relativePath: string

    Path relative to the sync root.

    size: number

    File size in bytes.

    type: "copy" = ...

    The kind of action.

    Methods

    • Copies the file (unless dryRun) and returns a 'copy-done' event.

      Parameters

      • dryRun: boolean

        Whether to simulate the action without making changes.

      Returns Promise<SyncEvent>

      An async generator yielding sync progress events.