pathological (version 0.1-1)

temp_dir: Return paths to files or dirs within the temp dir

Description

Vectorized wrappers to tempdir and tempfile that return standardized paths.

Usage

temp_dir(..., sep = c("/", "\\"))
temp_file(..., pattern = "file", fileext = "", sep = c("/", "\\"))

Arguments

...
Character vectors of further directories within the temp directory. Passed to file.path.
sep
String separator between directory levels in the output.
pattern
Character vector of prefixes for the temp file name. Passed to tempfile.
fileext
Character vector of file extensions for the temp file. Passed to tempfile.

Value

For temp_file a character vector giving the names of possible (temporary) files. Note that no files are generated by temp_file. For temp_dir, the path of the per-session temporary directory.

See Also

tempdir

Examples

Run this code
temp_dir(c("foo", "bar/baz"))
temp_file(c("foo", "bar/baz"), fileext = c(".txt", ".R"))

Run the code above in your browser using DataCamp Workspace