Ensures that the directory exists. If the directory structure does not exist, it is created. Like {\ttfamily mkdir -\/p}.

{\bfseries{Aliases\+:}} {\ttfamily mkdirs\+Sync()}, {\ttfamily mkdirp\+Sync()}


\begin{DoxyItemize}
\item {\ttfamily dir} {\ttfamily $<$String$>$}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_fs_extra_docs_ensureDir_sync_autotoc_md10999}{}\doxysection{Example\+:}\label{md_sfcode_node_modules_fs_extra_docs_ensureDir_sync_autotoc_md10999}

\begin{DoxyCode}{0}
\DoxyCodeLine{const fs = require('fs-\/extra')}
\DoxyCodeLine{}
\DoxyCodeLine{const dir = '/tmp/this/path/does/not/exist'}
\DoxyCodeLine{fs.ensureDirSync(dir)}
\DoxyCodeLine{// dir has now been created, including the directory it is to be placed in }

\end{DoxyCode}
 