| FileResourceClient {resourcer} | R Documentation |
File resource client
Description
File resource client
File resource client
Format
A R6 object of class FileResourceClient
Details
Base class that connects to a file using a FileResourceGetter.
Super class
resourcer::ResourceClient -> FileResourceClient
Methods
Public methods
Inherited methods
Method new()
Creates a new FileResourceClient instance.
Usage
FileResourceClient$new(resource, file.getter = NULL)
Arguments
resourceA valid resource object.
file.getterA FileResourceGetter object, optional. If not provided, it will be looked up in the FileResourceGetters registry. The operation will fail if none can be found.
Returns
A FileResourceClient object.
Method downloadFile()
Performs the file download, if it does not already exists locally.
Usage
FileResourceClient$downloadFile()
Returns
The local path to the downloaded file.
Method close()
Removes the file if it was downloaded. A local file resource will remain untouched.
Usage
FileResourceClient$close()
Method clone()
The objects of this class are cloneable with this method.
Usage
FileResourceClient$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
[Package resourcer version 1.4.0 Index]