Improve Collections create and move methods and update documentation
[arvados.git] / sdk / R / man / Collection.Rd
index 2f54bfe2eb5b08b5d83b70f1008d8a8cf2a97bb3..fbe6038664447df230ba77295f17d5df97274d29 100644 (file)
@@ -1,17 +1,49 @@
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/CTest.R
-\docType{data}
+% Please edit documentation in R/Collection.R
 \name{Collection}
 \alias{Collection}
-\title{Arvados Collection Object}
-\format{An object of class \code{R6ClassGenerator} of length 24.}
-\usage{
-Collection
-}
+\title{Collection}
 \description{
-Update description
+Collection class provides interface for working with Arvados collections.
+}
+\section{Usage}{
+
+\preformatted{collection = Collection$new(arv, uuid)}
+}
+
+\section{Arguments}{
+
+\describe{
+  \item{arv}{Arvados object.}
+  \item{uuid}{UUID of a collection.}
+}
 }
+
+\section{Methods}{
+
+\describe{
+  \item{add(content)}{Adds ArvadosFile or Subcollection specified by content to the collection.}
+  \item{create(files)}{Creates one or more ArvadosFiles and adds them to the collection at specified path.}
+  \item{remove(fileNames)}{Remove one or more files from the collection.}
+  \item{move(content, destination)}{Moves ArvadosFile or Subcollection to another location in the collection.}
+  \item{copy(content, destination)}{Copies ArvadosFile or Subcollection to another location in the collection.}
+  \item{getFileListing()}{Returns collections file content as character vector.}
+  \item{get(relativePath)}{If relativePath is valid, returns ArvadosFile or Subcollection specified by relativePath, else returns NULL.}
+}
+}
+
 \examples{
-arv = Collection$new(api, uuid)
+\dontrun{
+arv <- Arvados$new("your Arvados token", "example.arvadosapi.com")
+collection <- Collection$new(arv, "uuid")
+
+createdFiles <- collection$create(c("main.cpp", lib.dll), "cpp/src/")
+
+collection$remove("location/to/my/file.cpp")
+
+collection$move("folder/file.cpp", "file.cpp")
+
+arvadosFile <- collection$get("location/to/my/file.cpp")
+arvadosSubcollection <- collection$get("location/to/my/directory/")
+}
 }
-\keyword{datasets}