\hypertarget{group__Efreet__Trash}{}\section{Efreet\+\_\+\+Trash\+: The X\+DG Trash Specification}
\label{group__Efreet__Trash}\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}


\mbox{\hyperlink{Efreet__Trash_8h}{Efreet\+\_\+\+Trash.\+h}} provides all of the necessary headers and includes to work with Efreet\+\_\+\+Trash.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int \mbox{\hyperlink{group__Efreet__Trash_ga2143f714828cf918e3188dafa52af190}{efreet\+\_\+trash\+\_\+init}} (void)
\begin{DoxyCompactList}\small\item\em Initializes the efreet trash system. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int \mbox{\hyperlink{group__Efreet__Trash_gadabae8aa914a45470ec02a7a1ea5e82f}{efreet\+\_\+trash\+\_\+shutdown}} (void)
\begin{DoxyCompactList}\small\item\em Cleans up the efreet trash system. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char $\ast$ \mbox{\hyperlink{group__Efreet__Trash_gac019e8cb4554d7f7190bf6bc9961d5b4}{efreet\+\_\+trash\+\_\+dir\+\_\+get}} (const char $\ast$for\+\_\+file)
\begin{DoxyCompactList}\small\item\em Retrieves the X\+DG Trash local directory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int \mbox{\hyperlink{group__Efreet__Trash_ga67b6381a01374681566b35ad953e111a}{efreet\+\_\+trash\+\_\+delete\+\_\+uri}} (\mbox{\hyperlink{structEfreet__Uri}{Efreet\+\_\+\+Uri}} $\ast$uri, int force\+\_\+delete)
\begin{DoxyCompactList}\small\item\em This function try to move the given uri to the trash. Files on different filesystem can\textquotesingle{}t be moved to trash. If force\+\_\+delete is {\ttfamily 0} than non-\/local files will be ignored and {\ttfamily -\/1} is returned, if you set force\+\_\+delete to {\ttfamily 1} non-\/local files will be deleted without asking. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ \mbox{\hyperlink{group__Efreet__Trash_ga95dc95aca84e04f74709779eb2bebda7}{efreet\+\_\+trash\+\_\+ls}} (void)
\begin{DoxyCompactList}\small\item\em List all the files and directory currently inside the trash. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int \mbox{\hyperlink{group__Efreet__Trash_ga0facfddaf103a1bf7e515b4677bd4fa0}{efreet\+\_\+trash\+\_\+is\+\_\+empty}} (void)
\begin{DoxyCompactList}\small\item\em Check if the trash is currently empty. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int \mbox{\hyperlink{group__Efreet__Trash_ga09dd944f4567a90c04dbf6d146eb7a54}{efreet\+\_\+trash\+\_\+empty\+\_\+trash}} (void)
\begin{DoxyCompactList}\small\item\em Delete all the files inside the trash. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\mbox{\hyperlink{Efreet__Trash_8h}{Efreet\+\_\+\+Trash.\+h}} provides all of the necessary headers and includes to work with Efreet\+\_\+\+Trash. 



\subsection{Function Documentation}
\mbox{\Hypertarget{group__Efreet__Trash_ga2143f714828cf918e3188dafa52af190}\label{group__Efreet__Trash_ga2143f714828cf918e3188dafa52af190}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+init@{efreet\+\_\+trash\+\_\+init}}
\index{efreet\+\_\+trash\+\_\+init@{efreet\+\_\+trash\+\_\+init}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+init()}{efreet\_trash\_init()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int efreet\+\_\+trash\+\_\+init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Initializes the efreet trash system. 

\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success or {\ttfamily 0} on failure. 
\end{DoxyReturn}


References eina\+\_\+init(), eina\+\_\+log\+\_\+domain\+\_\+register(), E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+E\+RR, and eina\+\_\+shutdown().



Referenced by elm\+\_\+need\+\_\+efreet().

\mbox{\Hypertarget{group__Efreet__Trash_gadabae8aa914a45470ec02a7a1ea5e82f}\label{group__Efreet__Trash_gadabae8aa914a45470ec02a7a1ea5e82f}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+shutdown@{efreet\+\_\+trash\+\_\+shutdown}}
\index{efreet\+\_\+trash\+\_\+shutdown@{efreet\+\_\+trash\+\_\+shutdown}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+shutdown()}{efreet\_trash\_shutdown()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int efreet\+\_\+trash\+\_\+shutdown (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Cleans up the efreet trash system. 

\begin{DoxyReturn}{Returns}
No value. 
\end{DoxyReturn}


References eina\+\_\+log\+\_\+domain\+\_\+unregister(), and eina\+\_\+shutdown().

\mbox{\Hypertarget{group__Efreet__Trash_gac019e8cb4554d7f7190bf6bc9961d5b4}\label{group__Efreet__Trash_gac019e8cb4554d7f7190bf6bc9961d5b4}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+dir\+\_\+get@{efreet\+\_\+trash\+\_\+dir\+\_\+get}}
\index{efreet\+\_\+trash\+\_\+dir\+\_\+get@{efreet\+\_\+trash\+\_\+dir\+\_\+get}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+dir\+\_\+get()}{efreet\_trash\_dir\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char$\ast$ efreet\+\_\+trash\+\_\+dir\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{for\+\_\+file }\end{DoxyParamCaption})}



Retrieves the X\+DG Trash local directory. 

\begin{DoxyReturn}{Returns}
The X\+DG Trash local directory or {\ttfamily N\+U\+LL} on errors. Return value must be freed with eina\+\_\+stringshare\+\_\+del. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Efreet__Trash_ga67b6381a01374681566b35ad953e111a}\label{group__Efreet__Trash_ga67b6381a01374681566b35ad953e111a}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+delete\+\_\+uri@{efreet\+\_\+trash\+\_\+delete\+\_\+uri}}
\index{efreet\+\_\+trash\+\_\+delete\+\_\+uri@{efreet\+\_\+trash\+\_\+delete\+\_\+uri}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+delete\+\_\+uri()}{efreet\_trash\_delete\_uri()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int efreet\+\_\+trash\+\_\+delete\+\_\+uri (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structEfreet__Uri}{Efreet\+\_\+\+Uri}} $\ast$}]{uri,  }\item[{int}]{force\+\_\+delete }\end{DoxyParamCaption})}



This function try to move the given uri to the trash. Files on different filesystem can\textquotesingle{}t be moved to trash. If force\+\_\+delete is {\ttfamily 0} than non-\/local files will be ignored and {\ttfamily -\/1} is returned, if you set force\+\_\+delete to {\ttfamily 1} non-\/local files will be deleted without asking. 


\begin{DoxyParams}{Parameters}
{\em uri} & The local uri to move in the trash \\
\hline
{\em force\+\_\+delete} & If you set this to {\ttfamily 1} than files on different filesystems will be deleted permanently \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure or {\ttfamily -\/1} in case the uri is not on the same filesystem and force\+\_\+delete is not set. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Efreet__Trash_ga95dc95aca84e04f74709779eb2bebda7}\label{group__Efreet__Trash_ga95dc95aca84e04f74709779eb2bebda7}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+ls@{efreet\+\_\+trash\+\_\+ls}}
\index{efreet\+\_\+trash\+\_\+ls@{efreet\+\_\+trash\+\_\+ls}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+ls()}{efreet\_trash\_ls()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}}$\ast$ efreet\+\_\+trash\+\_\+ls (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



List all the files and directory currently inside the trash. 

\begin{DoxyReturn}{Returns}
A list of strings with filename (remember to free the list when you don\textquotesingle{}t need anymore). 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Efreet__Trash_ga0facfddaf103a1bf7e515b4677bd4fa0}\label{group__Efreet__Trash_ga0facfddaf103a1bf7e515b4677bd4fa0}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+is\+\_\+empty@{efreet\+\_\+trash\+\_\+is\+\_\+empty}}
\index{efreet\+\_\+trash\+\_\+is\+\_\+empty@{efreet\+\_\+trash\+\_\+is\+\_\+empty}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+is\+\_\+empty()}{efreet\_trash\_is\_empty()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int efreet\+\_\+trash\+\_\+is\+\_\+empty (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Check if the trash is currently empty. 

\begin{DoxyReturn}{Returns}
{\ttfamily 1} if the trash is empty or {\ttfamily 0} if some file are in. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Efreet__Trash_ga09dd944f4567a90c04dbf6d146eb7a54}\label{group__Efreet__Trash_ga09dd944f4567a90c04dbf6d146eb7a54}} 
\index{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}!efreet\+\_\+trash\+\_\+empty\+\_\+trash@{efreet\+\_\+trash\+\_\+empty\+\_\+trash}}
\index{efreet\+\_\+trash\+\_\+empty\+\_\+trash@{efreet\+\_\+trash\+\_\+empty\+\_\+trash}!Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification@{Efreet\+\_\+\+Trash\+: The X\+D\+G Trash Specification}}
\subsubsection{\texorpdfstring{efreet\+\_\+trash\+\_\+empty\+\_\+trash()}{efreet\_trash\_empty\_trash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int efreet\+\_\+trash\+\_\+empty\+\_\+trash (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Delete all the files inside the trash. 

\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success or {\ttfamily 0} on failure. 
\end{DoxyReturn}
