OpalFileResourceGetter: Opal file resource getter

OpalFileResourceGetterR Documentation

Opal file resource getter

Description

Opal file resource getter

Opal file resource getter

Format

A R6 object of class OpalFileResourceGetter

Details

Access a file that is stored in a Opal server. Use Basic authentication header if both resource's identity and secret are defined, token authentication if secret only is defined.

Super class

resourcer::FileResourceGetter -> OpalFileResourceGetter

Methods

Public methods

Inherited methods

Method new()

Creates a new OpalFileResourceGetter instance.

Usage
OpalFileResourceGetter$new()
Returns

A OpalFileResourceGetter object.


Method isFor()

Check that the provided resource has a URL that locates a Opal file: the URL scheme must be "opal+http" or "opal+https" and the path must designate a file web service entry point (i.e. starts with "ws/files/").

Usage
OpalFileResourceGetter$isFor(resource)
Arguments
resource

The resource object to validate.

Returns

A logical.


Method downloadFile()

Download the file from the Opal file system in a temporary location.

Usage
OpalFileResourceGetter$downloadFile(resource, ...)
Arguments
resource

A valid resource object.

...

Unused additional parameters.

Returns

The "resource.file" object.


Method clone()

The objects of this class are cloneable with this method.

Usage
OpalFileResourceGetter$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


obiba/resourcer documentation built on May 5, 2023, 10:08 a.m.