A fork of \href{https://github.com/sindresorhus/move-file}{\texttt{ move-\/file}} with compatibility with all node 10.\+x versions.

\begin{quote}
Move a file \end{quote}
The built-\/in \href{https://nodejs.org/api/fs.html\#fs_fs_rename_oldpath_newpath_callback}{\texttt{ {\ttfamily fs.\+rename()}}} is just a Java\+Script wrapper for the C {\ttfamily rename(2)} function, which doesn\textquotesingle{}t support moving files across partitions or devices. This module is what you would have expected {\ttfamily fs.\+rename()} to be.\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2122}{}\doxysection{Highlights}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2122}

\begin{DoxyItemize}
\item Promise API.
\item Supports moving a file across partitions and devices.
\item Optionally prevent overwriting an existing file.
\item Creates non-\/existent destination directories for you.
\item Support for Node versions that lack built-\/in recursive {\ttfamily fs.\+mkdir()}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2123}{}\doxysection{Install}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2123}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install @npmcli/move-\/file }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2124}{}\doxysection{Usage}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2124}

\begin{DoxyCode}{0}
\DoxyCodeLine{const moveFile = require('@npmcli/move-\/file');}
\DoxyCodeLine{}
\DoxyCodeLine{(async () => \{}
\DoxyCodeLine{    await moveFile('source/unicorn.png', 'destination/unicorn.png');}
\DoxyCodeLine{    console.log('The file has been moved');}
\DoxyCodeLine{\})(); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2125}{}\doxysection{API}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2125}
\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2126}{}\doxysubsection{move\+File(source, destination, options?)}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2126}
Returns a {\ttfamily Promise} that resolves when the file has been moved.\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2127}{}\doxysubsection{move\+File.\+sync(source, destination, options?)}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2127}
\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2128}{}\doxysubsubsection{source}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2128}
Type\+: {\ttfamily string}

File you want to move.\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2129}{}\doxysubsubsection{destination}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2129}
Type\+: {\ttfamily string}

Where you want the file moved.\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2130}{}\doxysubsubsection{options}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2130}
Type\+: {\ttfamily object}\hypertarget{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2131}{}\doxyparagraph{overwrite}\label{md_sfcode_node_modules__npmcli_move_file_README_autotoc_md2131}
Type\+: {\ttfamily boolean}\textbackslash{} Default\+: {\ttfamily true}

Overwrite existing destination file. 