\hypertarget{group__Efreet__Trash}{}\doxysection{Efreet\+\_\+\+Trash\+: The XDG Trash Specification}
\label{group__Efreet__Trash}\index{Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}


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


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} const char $\ast$ \mbox{\hyperlink{group__Efreet__Trash_gac0eb2bf1ec1dc22299fdbde34ef2ba58}{efreet\+\_\+trash\+\_\+dir\+\_\+get}} (const char $\ast$for\+\_\+file)
\begin{DoxyCompactList}\small\item\em Retrieves the XDG Trash local directory. \end{DoxyCompactList}\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ \mbox{\hyperlink{group__Efreet__Trash_ga4266d5821a64e4c07cd41a3c09e7c03c}{efreet\+\_\+trash\+\_\+ls}} (void)
\begin{DoxyCompactList}\small\item\em List all the files and directory currently inside the trash. \end{DoxyCompactList}\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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}


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



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Efreet__Trash_ga2143f714828cf918e3188dafa52af190}\label{group__Efreet__Trash_ga2143f714828cf918e3188dafa52af190}} 
\index{Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_init@{efreet\_trash\_init}}
\index{efreet\_trash\_init@{efreet\_trash\_init}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_init()}{efreet\_trash\_init()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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 \mbox{\hyperlink{Efreet_8h_a448e550a87271c7a74f8bf9963a8b81e}{efreet\+\_\+init()}}.



Referenced by \mbox{\hyperlink{group__Efreet_ga37f391bd7291bf814aba6431750537a9}{elm\+\_\+need\+\_\+efreet()}}.

\mbox{\Hypertarget{group__Efreet__Trash_gadabae8aa914a45470ec02a7a1ea5e82f}\label{group__Efreet__Trash_gadabae8aa914a45470ec02a7a1ea5e82f}} 
\index{Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_shutdown@{efreet\_trash\_shutdown}}
\index{efreet\_trash\_shutdown@{efreet\_trash\_shutdown}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_shutdown()}{efreet\_trash\_shutdown()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} int efreet\+\_\+trash\+\_\+shutdown (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Cleans up the efreet trash system. 

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


References \mbox{\hyperlink{Efreet_8h_a21312e3804b2ff4afed2e854b66ed827}{efreet\+\_\+shutdown()}}.

\mbox{\Hypertarget{group__Efreet__Trash_gac0eb2bf1ec1dc22299fdbde34ef2ba58}\label{group__Efreet__Trash_gac0eb2bf1ec1dc22299fdbde34ef2ba58}} 
\index{Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_dir\_get@{efreet\_trash\_dir\_get}}
\index{efreet\_trash\_dir\_get@{efreet\_trash\_dir\_get}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_dir\_get()}{efreet\_trash\_dir\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} const char $\ast$ efreet\+\_\+trash\+\_\+dir\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{for\+\_\+file }\end{DoxyParamCaption})}



Retrieves the XDG Trash local directory. 

\begin{DoxyReturn}{Returns}
The XDG Trash local directory or {\ttfamily NULL} 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 XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_delete\_uri@{efreet\_trash\_delete\_uri}}
\index{efreet\_trash\_delete\_uri@{efreet\_trash\_delete\_uri}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_delete\_uri()}{efreet\_trash\_delete\_uri()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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_ga4266d5821a64e4c07cd41a3c09e7c03c}\label{group__Efreet__Trash_ga4266d5821a64e4c07cd41a3c09e7c03c}} 
\index{Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_ls@{efreet\_trash\_ls}}
\index{efreet\_trash\_ls@{efreet\_trash\_ls}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_ls()}{efreet\_trash\_ls()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} \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 XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_is\_empty@{efreet\_trash\_is\_empty}}
\index{efreet\_trash\_is\_empty@{efreet\_trash\_is\_empty}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_is\_empty()}{efreet\_trash\_is\_empty()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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 XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}!efreet\_trash\_empty\_trash@{efreet\_trash\_empty\_trash}}
\index{efreet\_trash\_empty\_trash@{efreet\_trash\_empty\_trash}!Efreet\_Trash: The XDG Trash Specification@{Efreet\_Trash: The XDG Trash Specification}}
\doxysubsubsection{\texorpdfstring{efreet\_trash\_empty\_trash()}{efreet\_trash\_empty\_trash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} 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}
