Skip to contents

List the contents of a collection, optionally with stat, metadata, and/or access control information for each element in the collection.

Usage

ils(
  logical_path = ".",
  stat = FALSE,
  permissions = FALSE,
  metadata = FALSE,
  offset = 0,
  limit = 100,
  message = TRUE,
  verbose = FALSE
)

Arguments

logical_path

Path to the collection whose contents are to be listed. By default this is the current working collection (see ipwd()).

stat

Whether stat information should be included. Defaults to FALSE.

permissions

Whether access control information should be included. Defaults to FALSE.

metadata

Whether metadata information should be included. Defaults to FALSE.

offset

Number of records to skip for pagination. Defaults to 0.

limit

Number of records to show per page. Defaults to 100.

message

Whether a message should be printed when the collection is empty. Defaults to TRUE.

verbose

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

Value

Dataframe with logical paths and, if requested, additional information.

See also

ipwd() for finding the working collection, ipwd() for setting the working collection, and list.files() for an R equivalent.

Examples

is_irods_demo_running()
#> [1] TRUE

# 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")

# list home directory
ils()
#> This collection does not contain any objects or collections.

# make collection
imkdir("some_collection")

# list a different directory
ils("/tempZone/home/rods/some_collection")
#> This collection does not contain any objects or collections.

# show metadata
ils(metadata = TRUE)
#> 
#> ========
#> metadata
#> ========
#> /tempZone/home/rods/some_collection :
#> list()
#> 
#> 
#> ==========
#> iRODS Zone
#> ==========
#>                         logical_path       type
#>  /tempZone/home/rods/some_collection collection

# delete `some_collection`
irm("some_collection", force = TRUE, recursive = TRUE)