GridFsFileResourceGetter {resourcer}R Documentation

GridFS file resource getter

Description

GridFS file resource getter

GridFS file resource getter

Format

A R6 object of class GridFsFileResourceGetter

Details

Access a file that is in the MongoDB file store (GridFS). Credentials may apply.

Super class

resourcer::FileResourceGetter -> GridFsFileResourceGetter

Methods

Public methods

Inherited methods

Method new()

Creates a new GridFsFileResourceGetter instance.

Usage
GridFsFileResourceGetter$new()
Returns

A GridFsFileResourceGetter object.


Method isFor()

Check that the provided resource has a URL that locates a GridFS object: either the URL scheme is "gridfs" or it is "mongodb"/"mongodb+srv" with a query parameter "prefix=fs" (that identifies GridFS collection names).

Usage
GridFsFileResourceGetter$isFor(resource)
Arguments
resource

The resource object to validate.

Returns

A logical.


Method downloadFile()

Download the file from the MongoDB file store in a temporary location.

Usage
GridFsFileResourceGetter$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
GridFsFileResourceGetter$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package resourcer version 1.4.0 Index]