Skip to contents

Get absolute path to a file or directory

Usage

get_absolute_path(path)

Arguments

path

A path to a file or directory

Value

The absolute path to the file or directory

Examples

get_absolute_path("~/Documents")
#> Warning: path[1]="/home/runner/Documents": No such file or directory
#> [1] "/home/runner/Documents"
get_absolute_path("~")
#> [1] "/home/runner"
get_absolute_path(datastore_example_path())
#> Warning: path[1]="": No such file or directory
#> [1] "/"