% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paths.R
\name{tempdir2}
\alias{tempdir2}
\title{Make a temporary (sub-)directory}
\usage{
tempdir2(
  sub = "",
  tempdir = getOption("reproducible.tempPath", .reproducibleTempPath()),
  create = TRUE
)
}
\arguments{
\item{sub}{Character string, length 1. Can be a result of
\code{file.path("smth", "smth2")} for nested temporary subdirectories.
If the zero length character, then a random sub-directory will be created.}

\item{tempdir}{Optional character string where the temporary
directory should be placed. Defaults to \code{getOption("reproducible.tempPath")}.}

\item{create}{Logical. Should the directory be created. Default \code{TRUE}.}
}
\value{
A character string of a path (that will be created if \code{create = TRUE}) in a
sub-directory of the \code{tempdir()}.
}
\description{
Create a temporary subdirectory in \code{getOption("reproducible.tempPath")}.
}
\seealso{
\link{tempfile2}
}
