temp_dir
From pathological v0.1-1
by Richard Cotton
Return paths to files or dirs within the temp dir
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
Examples
temp_dir(c("foo", "bar/baz"))
temp_file(c("foo", "bar/baz"), fileext = c(".txt", ".R"))
Community examples
Looks like there are no examples yet.