Skip to contents

This is the equivalent of file.remove(), but applied to an item inside iRODS.

Usage

irm(logical_path, force = TRUE, recursive = FALSE, verbose = FALSE)

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 to TRUE.

recursive

If a collection is provided, whether its contents should also be removed. If a collection is not empty and recursive is FALSE, it cannot be deleted. Defaults to FALSE.

verbose

Whether information should be printed about the HTTP request and response. Defaults to FALSE.

Value

Invisibly the HTTP call.

See also

imkdir() for creating collections, file.remove() for an R equivalent.

Examples

# demonstration server (requires Bash, Docker and Docker-compose)
# use_irods_demo()

# connect project to server
create_irods("http://localhost/irods-rest/0.9.3", "/tempZone/home")

# 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        type
#>  /tempZone/home/rods/foo.rds data_object

# delete object
irm("foo.rds", force = TRUE)

# check if file is deleted
ils()
#> This collection does not contain any objects or collections.