Skip to contents

Get a temporary filename, similar to tempfile, except that it always writes to a temporary folder named beastier.

Usage

get_beastier_tempfilename(pattern = "file", fileext = "")

Arguments

pattern

a non-empty character vector giving the initial part of the name.

fileext

a non-empty character vector giving the file extension

Value

name for a temporary file

Note

this function is added to make sure no temporary cache files are left undeleted

Author

Richèl J.C. Bilderbeek

Examples

get_beastier_tempfilename()
#> [1] "/github/home/.cache/beastier/file9a4733da3fd"
get_beastier_tempfilename(pattern = "my_pattern_")
#> [1] "/github/home/.cache/beastier/my_pattern_9a43d3586c5"
get_beastier_tempfilename(fileext = ".ext")
#> [1] "/github/home/.cache/beastier/file9a41c350a45.ext"