% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/file_util.R
\name{ensure_directory_exists}
\alias{ensure_directory_exists}
\title{Check if a directory exists, and create it if not.  Errors if cannot be created or exists but is not a directory.}
\usage{
ensure_directory_exists(directory, recursive = TRUE)
}
\arguments{
\item{directory}{to be created}

\item{recursive}{if FALSE, the parent directory must exist.}
}
\value{
the directory, always with a trailing slash.  Raises an error if cannot be created
}
\description{
Check if a directory exists, and create it if not.  Errors if cannot be created or exists but is not a directory.
}
