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

    Interface ActionFactory

    Factory for creating concrete sync actions. Used by generateActions to decouple policy from execution.

    interface ActionFactory {
        copy(source: B2SyncPath, destPath: string): SyncAction;
        deleteLocal(path: LocalSyncPath): SyncAction;
        deleteRemote(path: B2SyncPath): SyncAction;
        download(source: B2SyncPath): SyncAction;
        hide(path: string): SyncAction;
        removeOrphan(dest: B2SyncPath): SyncAction;
        upload(source: LocalSyncPath): SyncAction;
    }
    Index

    Methods

    • Creates the right "remove this orphan from B2" action for the bucket's configuration: a hide on a file-lock-enabled bucket (where direct delete may be blocked or stack hide markers), a plain delete-file-version on a vanilla bucket. Used by actionsForDestOnly to avoid yielding both a hide AND a delete when only one of them is the correct semantic for the destination bucket.

      Parameters

      Returns SyncAction