Skip to contents

safe_to_write

Usage

safe_to_write(f, overwrite = FALSE)

Arguments

f

path to file

overwrite

logical, whether to overwrite if file already exists (default: FALSE)

Value

logical, whether it is safe to write to the file

Examples

safe_to_write(file.path(tempdir(), "new-file.txt"))
#> [1] TRUE