IMPORT_PATH: "@daiso-tech/core/file-storage/aws-file-storage-adapter"

Implements

Constructors

Methods

  • Copies source file to destination path, overwriting destination if it exists. Returns false if source doesn't exist; destination remains unchanged.

    Parameters

    • _context: IReadableContext
    • source: string

      Source file identifier/path to copy from

    • destination: string

      Destination file identifier/path to copy to (will be overwritten)

    Returns Promise<boolean>

    True if source was found and copied, false if source doesn't exist

  • Moves (renames) source file to destination path if destination doesn't exist. Destination is left unchanged if source not found or destination already exists. Effectively deletes the source file after successful copy.

    Parameters

    • context: IReadableContext

      Readable execution context for the operation

    • source: string

      Source file identifier/path to move from

    • destination: string

      Destination file identifier/path to move to

    Returns Promise<FileWriteEnum>

    FileWriteEnum indicating: SUCCESS (moved), NOT_FOUND (source missing), or KEY_EXISTS (destination exists)

  • Moves (renames) source file to destination path, overwriting destination if it exists. Returns false if source doesn't exist; destination remains unchanged. Effectively deletes the source file after successful copy.

    Parameters

    • context: IReadableContext

      Readable execution context for the operation

    • source: string

      Source file identifier/path to move from

    • destination: string

      Destination file identifier/path to move to (will be overwritten)

    Returns Promise<boolean>

    True if source was found and moved, false if source doesn't exist