To use \hyperlink{group__Eio__Management_gabf3d0f3208e36b93750526be652e19c3}{eio\+\_\+dir\+\_\+copy()}, you basically need the source and destination files (or directories), and set three callbacks\+:

\begin{DoxyItemize}
\item The notification callback, which allows you to know if a file or a directory is copied, and the progress of the copy. \item The end callback, which is called when the copy is finished. \item The error callback, which is called if an error occurred. You can then retrieve the error type as an errno error.\end{DoxyItemize}
\begin{DoxyWarning}{Warning}
It is the user\textquotesingle{}s duty to provide the \char`\"{}right target\char`\"{}. It means that copying to \textquotesingle{}.\textquotesingle{} will copy the content directly inside \textquotesingle{}.\textquotesingle{} and not in a subdirectory.
\end{DoxyWarning}
Here is a simple example\+:


\begin{DoxyCode}
\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\hyperlink{Eio_8h}{Eio.h}>}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_test\_notify\_cb(\textcolor{keywordtype}{void} *data, \hyperlink{group__Eio__List_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\_File} *handler, \textcolor{keyword}{const} \hyperlink{struct__Eio__Progress}{Eio\_Progress} *info)
\{
   \textcolor{keywordflow}{switch} (info->\hyperlink{struct__Eio__Progress_ad22889d94364501b49e38f8ab76b681d}{op})
      \{
      \textcolor{keywordflow}{case} \hyperlink{Eio_8h_af9cb2b88e673b8a3e6cb533fd1d90e4dab21f36fa998884ac4d36d9c114a88012}{EIO\_FILE\_COPY}:
         printf(\textcolor{stringliteral}{"[%s] %f%%\(\backslash\)n"}, info->\hyperlink{struct__Eio__Progress_a533f908b383c954f1a7e2b8545e36602}{dest}, info->\hyperlink{struct__Eio__Progress_a177cdb18d72bd8babab22b96b58ea6e2}{percent});
         \textcolor{keywordflow}{break};
      \textcolor{keywordflow}{case} \hyperlink{Eio_8h_af9cb2b88e673b8a3e6cb533fd1d90e4dad86557496ac7b04ab5b4fb648b7b2bcd}{EIO\_DIR\_COPY}:
         printf(\textcolor{stringliteral}{"global [%li/%li] %f%%\(\backslash\)n"}, info->\hyperlink{struct__Eio__Progress_a1b57c27fa219d799e27ce2f2b0480832}{current}, info->\hyperlink{struct__Eio__Progress_a575992c43ccfdc0a189054095b2bfae5}{max}, info->
      \hyperlink{struct__Eio__Progress_a177cdb18d72bd8babab22b96b58ea6e2}{percent});
         \textcolor{keywordflow}{break};
      \}
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_test\_done\_cb(\textcolor{keywordtype}{void} *data, \hyperlink{group__Eio__List_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\_File} *handler)
\{
   printf(\textcolor{stringliteral}{"copy done\(\backslash\)n"});
   \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_test\_error\_cb(\textcolor{keywordtype}{int} error, \hyperlink{group__Eio__List_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\_File} *handler, \textcolor{keywordtype}{void} *data)
\{
   fprintf(stderr, \textcolor{stringliteral}{"error: [%s]\(\backslash\)n"}, strerror(error));
    \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   \hyperlink{group__Eio__List_ga1145f009745ecb4d9f6a01a9bc5a9ac0}{Eio\_File} *cp;

   \textcolor{keywordflow}{if} (argc != 3)
     \{
        fprintf(stderr, \textcolor{stringliteral}{"eio\_cp source\_file destination\_file\(\backslash\)n"});
        \textcolor{keywordflow}{return} -1;
     \}

   \hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}();
   \hyperlink{group__Eio__Helper_gac612fe5df9b9c93c275ee373745c2471}{eio\_init}();

   cp = \hyperlink{group__Eio__Management_gabf3d0f3208e36b93750526be652e19c3}{eio\_dir\_copy}(argv[1], argv[2],
                     \_test\_notify\_cb,
                     \_test\_done\_cb,
                     \_test\_error\_cb,
                     NULL);

   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Eio__Helper_ga2281001078f6f99e3662bc889524831b}{eio\_shutdown}();
   \hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCode}
 