This is the equivalent of file.remove(), but applied to an item inside
iRODS.
Arguments
- logical_path
Path to the data object or collection to remove.
- force
Whether the data object or collection should be deleted permanently. If
FALSE, it is sent to the trash collection. Defaults toTRUE.- recursive
If a collection is provided, whether its contents should also be removed. If a collection is not empty and
recursiveisFALSE, it cannot be deleted. Defaults toFALSE.- catalog_only
Whether to remove only the catalog entry. Defaults to
FALSE.- verbose
Whether information should be printed about the HTTP request and response. Defaults to
FALSE.
See also
imkdir() for creating collections,
file.remove() for an R equivalent.
Examples
is_irods_demo_running()
#> [1] TRUE
# \dontshow{
.old_config_dir <- Sys.getenv("R_USER_CONFIG_DIR")
Sys.setenv("R_USER_CONFIG_DIR" = tempdir())
# }
# connect project to server
create_irods("http://localhost:9001/irods-http-api/0.2.0", overwrite = TRUE)
# authenticate
iauth("rods", "rods")
# some data
foo <- data.frame(x = c(1, 8, 9), y = c("x", "y", "z"))
# store
isaveRDS(foo, "foo.rds")
# check if file is stored
ils()
#>
#> ==========
#> iRODS Zone
#> ==========
#> logical_path
#> /tempZone/home/rods/foo.rds
# delete object
irm("foo.rds", force = TRUE)
# check if file is deleted
ils()
#> This collection does not contain any objects or collections.
# \dontshow{
Sys.setenv("R_USER_CONFIG_DIR" = .old_config_dir)
# }
