Skip to contents

Register a storage adapter

Usage

register_adapter(
  name,
  detect,
  open,
  probe,
  read,
  close,
  capabilities = NULL,
  scan = NULL,
  ...
)

Arguments

name

Adapter name

detect

Function (source) -> score in [0,1] or FALSE

open

Function (source, ...) -> handle

probe

Function (handle, ...) -> list(metadata)

read

Function (handle, assays, block = NULL, ...) -> named list of arrays

close

Function (handle) -> NULL

capabilities

Optional scan-capability declaration. Supported fields are sample_blocks, subject_blocks, contrast_blocks, persistent_handle, preferred_axis, cheap_revisit, and requires_staging. Omitted fields default conservatively.

scan

Optional adapter-specific scan callback.

...

Additional elements stored with adapter entry

Value

Invisibly, the adapter entry