X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/74cffe96768727e8b727cdb54358729c91bec130..353cfc20742aaa069eecba2b291cb56a78e4d497:/sdk/R/README.Rmd?ds=sidebyside diff --git a/sdk/R/README.Rmd b/sdk/R/README.Rmd index 001a3efc13..18454bf2ae 100644 --- a/sdk/R/README.Rmd +++ b/sdk/R/README.Rmd @@ -133,7 +133,7 @@ files <- collection$getFileListing() arvadosFile <- collection$get("location/to/my/file.cpp") ``` - or +or ```{r} arvadosSubcollection <- collection$get("location/to/my/directory/") @@ -177,7 +177,7 @@ fileContent <- arvadosFile$read("raw", offset = 1024, length = 512) size <- arvadosFile$getSizeInBytes() ``` - or +or ```{r} size <- arvadosSubcollection$getSizeInBytes() @@ -186,31 +186,16 @@ size <- arvadosSubcollection$getSizeInBytes() * Create new file in a collection: ```{r} -collection$create(fileNames, optionalRelativePath) +collection$create(files) ``` - Example: +Example: ```{r} -mainFile <- collection$create("main.cpp", "cpp/src/") -fileList <- collection$create(c("main.cpp", lib.dll), "cpp/src/") +mainFile <- collection$create("cpp/src/main.cpp") +fileList <- collection$create(c("cpp/src/main.cpp", "cpp/src/util.h")) ``` -* Add existing ArvadosFile or Subcollection to a collection: - -```{r} -folder <- Subcollection$new("src") -file <- ArvadosFile$new("main.cpp") -folder$add(file) -``` - -```{r} -collection$add(folder, "cpp") -``` - -This examples will add file "main.cpp" in "./cpp/src/" folder if folder exists. -If subcollection contains more files or folders they will be added recursively. - * Delete file from a collection: ```{r}