| ShellResourceClient {resourcer} | R Documentation |
Shell resource client
Description
Shell resource client
Shell resource client
Format
A R6 object of class ShellResourceClient
Details
Executes local system shell commands.
Super classes
resourcer::ResourceClient -> resourcer::CommandResourceClient -> ShellResourceClient
Methods
Public methods
Inherited methods
Method new()
Create a ShellResourceClient instance. This client will interact wtih a computation resource using shell commands.
Usage
ShellResourceClient$new(resource)
Arguments
resourceThe computation resource.
Returns
The ShellResourceClient object.
Method getAllowedCommands()
Get the command names that can be executed.
Usage
ShellResourceClient$getAllowedCommands()
Returns
A character vector
Method copyFile()
Copy one or more files (wilcard * is supported in the file name (which can be a directory))
Usage
ShellResourceClient$copyFile(file, to = ".", verbose = FALSE)
Arguments
fileThe file to copy.
toThe copy destination.
verboseIf TRUE, details the file operations on the console output.
Returns
The path to the files having been copied.
Method exec()
Executes a shell command in the working directory specified in the resource's URL.
Usage
ShellResourceClient$exec(command, params = NULL, test = FALSE)
Arguments
commandThe command name.
paramsA character vector of arguments to pass.
testIf TRUE, the command is printed but not executed (for debugging).
Returns
The command execution result object.
Method clone()
The objects of this class are cloneable with this method.
Usage
ShellResourceClient$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.