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

Description Usage Arguments Value See Also Examples

View source: R/wrappers.R

Description

Vectorized wrappers to tempdir and tempfile that return standardized paths.

Usage

1
2
3
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

1
2
temp_dir(c("foo", "bar/baz"))
temp_file(c("foo", "bar/baz"), fileext = c(".txt", ".R"))

pathological documentation built on May 19, 2017, 11:03 a.m.

Search within the pathological package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.