else
{
stop(paste("Expected AravodsFile or Subcollection object, got",
- class(content), "."))
+ paste0("(", paste0(class(content), collapse = ", "), ")"),
+ "."))
}
},
}
else
{
- stop(paste("Expected character, got", class(content), "."))
+ stop(paste("Expected character, got",
+ paste0("(", paste0(class(name), collapse = ", "), ")"),
+ "."))
}
},
file <- collection$get("location/to/my/file.cpp")
-file$removeFromCollection()
+collection$remove(file)
#Or
-collection$remove(file)
+collection$remove("location/to/my/file.cpp")
#Both examples will remove file "file.cpp" from a collection
+#You can remove both Subcollection and ArvadosFile
#If subcollection contains more files or folders they will be removed recursively.
#You can also remove multiple files
collection$remove(c("path/to/my/file.cpp", "path/to/other/file.cpp"))
+#Delete file or folder from a Subcollection
+
+subcollection <- collection$get("mySubcollection/")
+subcollection$remove("fileInsideSubcollection.exe")
+subcollection$remove("folderInsideSubcollection/")
+
--------------------------------------------------------------------------------------------------------------------------------
#Move file or folder inside collection
expect_that(Arvados$new(),
throws_error(paste0("Please provide host name and authentification token",
" or set ARVADOS_API_HOST and ARVADOS_API_TOKEN",
- " environmental variables.")))
+ " environment variables.")))
})
test_that("getWebDavHostName calls REST service properly", {