This is the directory that Stencila stores temporary files, such as named pipes. This is different to tempdir() (which includes a unique identifier for the R session) because it needs to be discoverable by other Stencila apps, e.g. Executa.

tmp_dir(subdir = NULL, ensure = FALSE)

Arguments

subdir

A subdirectory to create

ensure

Ensure that the directory (and subdir if specified) are present?

Details

The temporary directory is determined from the first of the following:

  • the environment variables, TMPDIR, TEMP, and TMP, in that order

  • on Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order

  • on all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order

  • the current working directory.