Skip to contents

[Experimental]

  • get_wd_here() gets the working directory to the path of the current script.

  • set_wd_here() sets the working directory to the path of the current script.

  • open_wd_here() Open the File Explorer at the directory path of the current script.

  • open_wd() Open the File Explorer at the current working directory.

Usage

set_wd_here(path = NULL)

get_wd_here(path = NULL)

open_wd_here(path = get_wd_here())

open_wd(path = getwd())

Arguments

path

Path components below the project root. Defaults to NULL. This means that the directory will be set to the path of the file. If the path doesn't exist, the user will be asked if he wants to create such a folder.

Value

  • get_wd_here() returns a full-path directory name.

  • get_wd_here() returns a message showing the current working directory.

  • open_wd_here() Opens the File Explorer of the path returned by get_wd_here().

Examples


if (FALSE) { # \dontrun{
get_wd_here()
set_wd_here()
open_wd_here()
} # }