Skip to contents

ipwd() and icd() are the iRODS equivalents of getwd() and setwd() respectively. For example, whereas getwd() returns the current working directory in the local system, ipwd() returns the current working directory in iRODS.

Usage

icd(dir)

ipwd()

Arguments

dir

Collection to set as working directory.

Value

Invisibly the current directory before the change (same convention as setwd()).

See also

setwd() and getwd() for R equivalents, ils() for listing collections and objects in iRODS.

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", "rodsadmin")

# default dir
icd(".")
ipwd()
#> [1] "/tempZone"

# relative paths work as well
icd("/tempZone/home")
ipwd()
#> [1] "/tempZone/home"

# go back on level lower
icd("..")
ipwd()
#> [1] "/tempZone"

# absolute paths work as well
icd("/tempZone/home/rods")
ipwd()
#> [1] "/tempZone/home/rods"

# back home
icd("/tempZone/home")
# \dontshow{
Sys.setenv("R_USER_CONFIG_DIR" = .old_config_dir)
# }