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

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

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

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