sfapi-ts

Home > @cjh1/sfapi > UtilitiesService

UtilitiesService class

Signature:

export declare class UtilitiesService 

Constructors

Constructor Modifiers Description
(constructor)(httpRequest)   Constructs a new instance of the UtilitiesService class

Properties

Property Modifiers Type Description
httpRequest readonly BaseHttpRequest  

Methods

Method Modifiers Description
downloadFile(machine, path, binary)   <p>Download File Download a _small_ file from a NERSC system.</p><p>- **machine**: the name of the machine to use - **path**: the remote path of the file - **binary**: (optional) If true the file will be returned base64-encoded</p>
listDirectory(machine, path)   <p>Read Directory List a directory on a NERSC system</p><p>- **machine**: the name of the machine to use - **path**: the remote path of the directory</p>
runCommand(machine, formData)   <p>Run Command Run a command on a NERSC system</p><p>- **machine**: the name of the machine to use - **executable**: the executable to run. Note that if you want to run a bash command, you must first run bash. Eg.: bash -c "echo $PWD"</p><p>This command will return a task id that can be looked up via the /tasks/task api. The body of the task will be the result of the executable.</p>
uploadFile(machine, path, formData)   <p>Upload File Upload a _small_ file to a NERSC system.</p><p>- **machine**: the name of the machine to use - **path**: the remote path of the file - **file**: the file uploaded from your local machine</p>