9 # ifdef EFL_EFREET_TRASH_BUILD
11 # define EAPI __declspec(dllexport)
14 # endif /* ! DLL_EXPORT */
16 # define EAPI __declspec(dllimport)
17 # endif /* ! EFL_EFREET_TRASH_BUILD */
21 # define EAPI __attribute__ ((visibility("default")))
35 * @file Efreet_Trash.h
36 * @brief Contains the methods used to support the FDO trash specification.
37 * @addtogroup Efreet_Trash Efreet_Trash: The XDG Trash Specification
38 * Efreet_Trash.h provides all of the necessary headers and includes to
39 * work with Efreet_Trash.
44 * @return @c 1 on success or @c 0 on failure.
45 * @brief Initializes the efreet trash system
47 EAPI int efreet_trash_init(void);
51 * @brief Cleans up the efreet trash system
53 EAPI int efreet_trash_shutdown(void);
56 * @return The XDG Trash local directory or @c NULL on errors.
57 * Return value must be freed with eina_stringshare_del.
58 * @brief Retrieves the XDG Trash local directory
60 EAPI const char *efreet_trash_dir_get(const char *for_file);
63 * @param uri The local uri to move in the trash
64 * @param force_delete If you set this to @c 1 than files on different filesystems
65 * will be deleted permanently
66 * @return @c 1 on success, @c 0 on failure or @c -1 in case the uri is not on
67 * the same filesystem and force_delete is not set.
68 * @brief This function try to move the given uri to the trash. Files on
69 * different filesystem can't be moved to trash. If force_delete
70 * is @c 0 than non-local files will be ignored and @c -1 is returned, if you set
71 * force_delete to @c 1 non-local files will be deleted without asking.
73 EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete);
76 * @return A list of strings with filename (remember to free the list
77 * when you don't need anymore).
78 * @brief List all the files and directory currently inside the trash.
80 EAPI Eina_List *efreet_trash_ls(void);
83 * @return @c 1 if the trash is empty or @c 0 if some file are in.
84 * @brief Check if the trash is currently empty
86 EAPI int efreet_trash_is_empty(void);
89 * @return @c 1 on success or @c 0 on failure.
90 * @brief Delete all the files inside the trash.
92 EAPI int efreet_trash_empty_trash(void);