Implement copy method, update move method and remove trailing
[arvados.git] / sdk / R / README.Rmd
index be34b2fdb1dabd3531ca74e696a8240528418520..001a3efc13b8cf9afcd01ffb6e28fa4b5e19d1ce 100644 (file)
@@ -259,6 +259,28 @@ subcollection$move("newDestination/folder")
 Make sure to include new file name in destination.
 In second example file$move("newDestination/") will not work.
 
+* Copy file or folder inside collection:
+
+Directley from collection
+
+```{r}
+collection$copy("folder/file.cpp", "file.cpp")
+```
+
+Or from file
+
+```{r}
+file <- collection$get("location/to/my/file.cpp")
+file$copy("destination/file.cpp")
+```
+
+Or from subcollection
+
+```{r}
+subcollection <- collection$get("location/to/folder")
+subcollection$copy("destination/folder")
+```
+
 #### Working with Aravdos projects
 
 * Get a project: