Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is {\bfseries{NOT MODIFIED}}.

{\bfseries{Alias\+:}} {\ttfamily create\+File\+Sync()}


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

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

\end{DoxyCode}
 