Implement copy method, update move method and remove trailing
[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(destination)}{Moves subcollection to a new location inside collection.}
33   \item{copy(destination)}{Copies subcollection to a new location inside collection.}
34 }
35 }
36
37 \examples{
38 \dontrun{
39 myFolder <- Subcollection$new("myFolder")
40 myFile   <- ArvadosFile$new("myFile")
41
42 myFolder$add(myFile)
43 myFolder$get("myFile")
44 myFolder$remove("myFile")
45
46 myFolder$move("newLocation/myFolder")
47 myFolder$copy("newLocation/myFolder")
48 }
49 }