Removes a file or directory. The directory can have contents. Like {\ttfamily rm -\/rf}.


\begin{DoxyItemize}
\item {\ttfamily path} {\ttfamily $<$String$>$}
\item {\ttfamily callback} {\ttfamily $<$Function$>$}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_fs_extra_docs_remove_autotoc_md11041}{}\doxysection{Example\+:}\label{md_sfcode_node_modules_fs_extra_docs_remove_autotoc_md11041}

\begin{DoxyCode}{0}
\DoxyCodeLine{const fs = require('fs-\/extra')}
\DoxyCodeLine{}
\DoxyCodeLine{// remove file}
\DoxyCodeLine{fs.remove('/tmp/myfile', err => \{}
\DoxyCodeLine{  if (err) return console.error(err)}
\DoxyCodeLine{}
\DoxyCodeLine{  console.log('success!')}
\DoxyCodeLine{\})}
\DoxyCodeLine{}
\DoxyCodeLine{fs.remove('/home/jprichardson', err => \{}
\DoxyCodeLine{  if (err) return console.error(err)}
\DoxyCodeLine{}
\DoxyCodeLine{  console.log('success!') // I just deleted my entire HOME directory.}
\DoxyCodeLine{\})}
\DoxyCodeLine{}
\DoxyCodeLine{// Promise Usage}
\DoxyCodeLine{fs.remove('/tmp/myfile')}
\DoxyCodeLine{.then(() => \{}
\DoxyCodeLine{  console.log('success!')}
\DoxyCodeLine{\})}
\DoxyCodeLine{.catch(err => \{}
\DoxyCodeLine{  console.error(err)}
\DoxyCodeLine{\}) }

\end{DoxyCode}
 