Skip to contents

Store class that uses HTTP requests. Read-only. Depends on the crul package.

Format

R6::R6Class inheriting from Store.

Details

For parallel operation, set the "pizzarr.parallel_backend" option to one of:

  • "future" if a future plan has been set up

  • integer if you would like a one-time use cluster created per call

  • cluster object created with parallel::make_cluster() if you want to reuse a cluster

Set the option "pizzarr.progress_bar" to TRUE to get a progress bar for long running reads.

For more, see vignette("parallel").

See also

Other Store classes: DirectoryStore, MemoryStore, Store

Super class

pizzarr::Store -> HttpStore

Methods

Inherited methods


Method new()

Create a HttpStore object

Usage

HttpStore$new(url, options = NA, headers = NA)

Arguments

url

(character(1))
URL of the store.

options

(list() or NA)
Options passed to crul.

headers

(list() or NA)
Headers passed to crul.

Returns

A new HttpStore object.


Method get_item()

Get an item from the store.

Usage

HttpStore$get_item(item)

Arguments

item

The item key.

Returns

The item data in a vector of type raw.


Method contains_item()

Determine whether the store contains an item.

Usage

HttpStore$contains_item(item)

Arguments

item

The item key.

Returns

A boolean value.


Method listdir()

Fetches .zmetadata from the store evaluates its names

Usage

HttpStore$listdir()

Returns

Character vector of unique keys that do not start with a ..


Method get_cache_time_seconds()

Get cache time of http requests.

Usage

HttpStore$get_cache_time_seconds()

Returns

numeric(1).


Method set_cache_time_seconds()

Set cache time of http requests.

Usage

HttpStore$set_cache_time_seconds(seconds)

Arguments

seconds

Number of seconds until cache is invalid – 0 for no cache.

Returns

NULL (called for side effects).


Method print()

Print a human-readable summary of the store.

Usage

HttpStore$print(...)

Arguments

...

Ignored.

Returns

self (invisibly).


Method clone()

The objects of this class are cloneable with this method.

Usage

HttpStore$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.