Files-class: Class Files

Description Usage Arguments Details Value Fields Methods Note Examples

Description

Class Files

Usage

1

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

parent

parent folder ID

type

"FILE" or "FOLDER"

description

file description

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

copy_to_folder(folder_id, name_new = NULL, ...)

Copy a file to a folder.

create_folder(name, ...)

Create a new folder under the parent folder.

create_marker( name = NULL, start = NULL, end = NULL, chromosome = NULL, private = TRUE, ... )

Create a marker.

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

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

get_parent_folder()

Get the parent folder object of the current file/folder.

get_parent_folder_id()

Get the parent folder ID of the current file/folder.

list_folder_contents(type = c("file", "folder"), ...)

List folder contents (return files, folders, or both).

marker(id = NULL, ...)

List markers available on a file or get details for a marker.

meta()

get metadata from a file

move_to_folder(folder_id, name_new = NULL, ...)

Move a file to a folder.

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

typeof()

Get object type ("file" or "folder").

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

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

Note

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

Examples

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

sevenbridges documentation built on March 25, 2021, 6 p.m.