df0970b30fd4ef843b595f8db52efbafd9b140a4
[arvados.git] / sdk / R / man / Subcollection.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/Subcollection.R
3 \name{Subcollection}
4 \alias{Subcollection}
5 \title{Subcollection}
6 \description{
7 Subcollection class represents a folder inside Arvados collection.
8 It is essentially a composite of ArvadosFiles and other Subcollections.
9 }
10 \section{Usage}{
11
12 \preformatted{subcollection = Subcollection$new(name)}
13 }
14
15 \section{Arguments}{
16
17 \describe{
18   \item{name}{Name of the subcollection.}
19 }
20 }
21
22 \section{Methods}{
23
24 \describe{
25   \item{getName()}{Returns name of the subcollection.}
26   \item{getRelativePath()}{Returns subcollection path relative to the root.}
27   \item{add(content)}{Adds ArvadosFile or Subcollection specified by content to the subcollection.}
28   \item{remove(name)}{Removes ArvadosFile or Subcollection specified by name from the subcollection.}
29   \item{get(relativePath)}{If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.}
30   \item{getFileListing()}{Returns subcollections file content as character vector.}
31   \item{getSizeInBytes()}{Returns subcollections content size in bytes.}
32   \item{move(newLocation)}{Moves subcollection to a new location inside collection.}
33 }
34 }
35
36 \examples{
37 \dontrun{
38 myFolder <- Subcollection$new("myFolder")
39 myFile   <- ArvadosFile$new("myFile")
40
41 myFolder$add(myFile)
42 myFolder$get("myFile")
43 myFolder$remove("myFile")
44
45 myFolder$move("newLocation/myFolder")
46 }
47 }