SubcollectionR Documentation

Subcollection

Description

Subcollection class represents a folder inside Arvados collection. It is essentially a composite of arvadosFiles and other subcollections.

Usage

subcollection = Subcollection$new(name)

Arguments

name

Name of the subcollection.

Methods

getName()

Returns name of the subcollection.

getRelativePath()

Returns subcollection path relative to the root.

add(content)

Adds ArvadosFile or Subcollection specified by content to the subcollection.

remove(name)

Removes ArvadosFile or Subcollection specified by name from the subcollection.

get(relativePath)

If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.

getFileListing()

Returns subcollections file content as character vector.

getSizeInBytes()

Returns subcollections content size in bytes.

move(destination)

Moves subcollection to a new location inside collection.

copy(destination)

Copies subcollection to a new location inside collection.

Examples

## Not run: 
myFolder <- Subcollection$new("myFolder")
myFile   <- ArvadosFile$new("myFile")

myFolder$add(myFile)
myFolder$get("myFile")
myFolder$remove("myFile")

myFolder$move("newLocation/myFolder")
myFolder$copy("newLocation/myFolder")

## End(Not run)