powered by
path
We set paths on some objects, these are convenience wrappers to attr.
attr
get_path(x, force = FALSE)set_path(x, path, action = c(NA, "read", "write"), overwrite = FALSE)
set_path(x, path, action = c(NA, "read", "write"), overwrite = FALSE)
An object.
Force the retrieval, even if the path is not valid? Only meant for unit testing, leave alone!
The path to be set.
Do we have a read or write process? Passed by read_csv and write_csv. Leave alone otherwise.
read_csv
write_csv
Overwrite an existing path attribute instead of throwing an error?
For get_path the value of attr(x, "path").
get_path
attr(x, "path")
For set_path the modified object.
set_path
Other file utilities: file_copy(), file_modified_last(), file_save(), find_files(), get_mtime(), get_unique_string(), is_files_current(), is_path(), search_files(), split_code_file(), touch()
file_copy()
file_modified_last()
file_save()
find_files()
get_mtime()
get_unique_string()
is_files_current()
is_path()
search_files()
split_code_file()
touch()
# NOT RUN { x <- 2 path <- tempfile() touch(path) x <- set_path(x, path) get_path(x) # }
Run the code above in your browser using DataLab