13111: Merge branch 'master' into 12308-go-fuse
[arvados.git] / sdk / R / man / Collection.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/Collection.R
3 \name{Collection}
4 \alias{Collection}
5 \title{Collection}
6 \description{
7 Collection class provides interface for working with Arvados collections.
8 }
9 \section{Usage}{
10
11 \preformatted{collection = Collection$new(arv, uuid)}
12 }
13
14 \section{Arguments}{
15
16 \describe{
17   \item{arv}{Arvados object.}
18   \item{uuid}{UUID of a collection.}
19 }
20 }
21
22 \section{Methods}{
23
24 \describe{
25   \item{add(content)}{Adds ArvadosFile or Subcollection specified by content to the collection.}
26   \item{create(fileNames, relativePath = "")}{Creates one or more ArvadosFiles and adds them to the collection at specified path.}
27   \item{remove(fileNames)}{Remove one or more files from the collection.}
28   \item{move(content, newLocation)}{Moves ArvadosFile or Subcollection to another location in the collection.}
29   \item{getFileListing()}{Returns collections file content as character vector.}
30   \item{get(relativePath)}{If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.}
31 }
32 }
33
34 \examples{
35 \dontrun{
36 arv <- Arvados$new("your Arvados token", "example.arvadosapi.com")
37 collection <- Collection$new(arv, "uuid")
38
39 newFile <- ArvadosFile$new("myFile")
40 collection$add(newFile, "myFolder")
41
42 createdFiles <- collection$create(c("main.cpp", lib.dll), "cpp/src/")
43
44 collection$remove("location/to/my/file.cpp")
45
46 collection$move("folder/file.cpp", "file.cpp")
47
48 arvadosFile <- collection$get("location/to/my/file.cpp")
49 arvadosSubcollection <- collection$get("location/to/my/directory/")
50 }
51 }