FilesApi: Files operations

Description Usage Format Methods

Description

rAgave.Files

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Methods

clear_file_item_permissions

'$delete

$download(path, systemId, filename) Downloads the file on th remote system to the local disk. The original remote filename is preserved if none is provied.'

$load(path, systemId, maxLength, mimeType) Fetches the remote file as a byte stream and loads it into memory, parsing into an appropriate data object based on the mimetype provided, or the content-type of the response header if no mimeType value is provided. By default, any file larger than 512MB will be rejected. To accept a larger file, set the maxLength value to an integer value larger than 2^29. The user is responsible for ensuring they have enough memory to load the target file.

$stream(path, systemId, callback) Fetches the remote file as a byte stream an returns it to the callback function as an argument.

transfer(path, systemId, source, body) Initiate a transfer of a file from one location to another. For convenience, the source url can be provided. For detailed transfer requests including policy, notifications, permissions, etc, provide a valid body to pass on to the API.

If the transfer is within a single system, it is usually faster to use the copy action of a manage operation.

The source URL may be given in the following forms:

$upload(path, systemId, localPath, body) Upload a local file to the given system within the given directory path. The remote path must be a directory. If no body is provided, the local filename is preserved and will overwrite a remote file with the same name, if present.

For detailed transfer requests including policy, notifications, permissions, etc, provide a valid body to pass on to the API.

$manage(path, systemId, body) Performs management actions on the file item on the given system at the given path

$history(path, systemId) Lists history of the file item on the given system at the given path.

$listPermissions() List the permissions assigned to file item on the given system at the given path.

$list() List the file item at the given path on the given system.

$updatePermissions(path, systemId, username, permission, recursive) Add or update a user permission for the given file item on the given system.


agaveplatform/r-sdk documentation built on May 13, 2019, 8:20 a.m.