Files-class {sevenbridges}R Documentation

Class Files

Description

Class Files

Usage

FilesList(...)

Arguments

...

one or more Files objects

Details

Files (with "s") class is usally returned by the API call which returns Files. A group of Files is defined as FilesList. Users do not usually need to construct Files or FilesList manually, they are generated from a API call most of the time.

Value

Files object

Fields

id

character used as file id

name

string used as file name

size

file size

project

project id if any, when returned by a API call, it usually return the project id and stored with the object.

created_on

date created on

modified_on

date modified on

storage

list as storage type

origin

list as origin

tags

list as tags

metadata

a list for metadata associated with the file

url

file download url

Methods

add_tag(x, ...)

add new tags while keeping old tags

copy_to(project = NULL, name = NULL)

copy a file to a project (id) with new name

download(destfile, ..., method = "curl")

see 'help(download.file)' for more options

meta()

get metadata from a file

setMeta(..., overwrite = FALSE)

set metadata with provided list, when overwrite is set to TRUE, it overwrites the metadata

set_meta(..., overwrite = FALSE)

set metadata with provided list, when overwrite is set to TRUE, it overwrites the metadata

set_tag(x = NULL, overwrite = TRUE, ...)

set a tag for a file, your tag need to be a list or vector

tag()

get tag from a file

update(name = NULL, metadata = NULL, tags = NULL)

This call updates the name, the full set metadata, and tags for a specified file.

Note

In sevenbridges package version <= 1.5.4, the Files class inherits from the File class defined in CWL. To avoid confusion, in the current implementation, they are defined separately and not coupled anymore.

Examples

Files(id = "test_id", name = "test.bam")

[Package sevenbridges version 1.8.1 Index]