This are helper provided around core Eio API. More...
Functions | |
| EAPI int | eio_init (void) |
| Initialize eio and all it's required submodule. More... | |
| EAPI int | eio_shutdown (void) |
| Shutdown eio and all it's submodule if possible. More... | |
| EAPI void * | eio_file_container_get (Eio_File *ls) |
| Return the container during EIO operation. More... | |
| EAPI Eina_Bool | eio_file_cancel (Eio_File *ls) |
| Cancel any Eio_File. More... | |
| EAPI Eina_Bool | eio_file_check (Eio_File *ls) |
| Check if an Eio_File operation has been cancelled. More... | |
| EAPI Eina_Bool | eio_file_associate_add (Eio_File *ls, const char *key, const void *data, Eina_Free_Cb free_cb) |
| Associate data with the current filtered file. More... | |
| EAPI Eina_Bool | eio_file_associate_direct_add (Eio_File *ls, const char *key, const void *data, Eina_Free_Cb free_cb) |
| Associate data with the current filtered file. More... | |
| EAPI void * | eio_file_associate_find (Eio_File *ls, const char *key) |
| Get the data associated during the filter callback inside the main loop. More... | |
| static double | eio_file_atime (const Eina_Stat *stat) |
| get access time from a Eina_Stat More... | |
| static double | eio_file_mtime (const Eina_Stat *stat) |
| get modification time from a Eina_Stat More... | |
| static long long | eio_file_size (const Eina_Stat *stat) |
| get the size of the file described in Eina_Stat More... | |
| static Eina_Bool | eio_file_is_dir (const Eina_Stat *stat) |
| tell if the stated path was a directory or not. More... | |
| static Eina_Bool | eio_file_is_lnk (const Eina_Stat *stat) |
| tell if the stated path was a link or not. More... | |
This are helper provided around core Eio API.
This set of functions do provide helper to work around data provided by Eio without the need to look at system header.
| EAPI int eio_init | ( | void | ) |
Initialize eio and all it's required submodule.
References EAPI, ecore_init(), eina_init(), eina_log_domain_register(), eina_log_domain_unregister(), EINA_LOG_ERR, eina_log_timing(), and eina_shutdown().
Referenced by edje_init().
| EAPI int eio_shutdown | ( | void | ) |
Shutdown eio and all it's submodule if possible.
References ecore_shutdown(), eina_log_domain_unregister(), eina_log_timing(), eina_shutdown(), and EINA_TRASH_CLEAN.
Referenced by edje_init().
Return the container during EIO operation.
| ls | The asynchronous I/O operation to retrieve container from. |
This is only available and make sense in the thread callback, not in the mainloop.
References EAPI, and EINA_FALSE.
Cancel any Eio_File.
| ls | The asynchronous I/O operation to cancel. |
This will cancel any kind of I/O operation and cleanup the mess. This means that it could take time to cancel an I/O.
References EAPI, ecore_thread_cancel(), and EINA_FALSE.
Referenced by emotion_object_file_set().
Check if an Eio_File operation has been cancelled.
| ls | The asynchronous I/O operation to check. |
In case of an error it also return EINA_TRUE.
References EAPI, ecore_thread_check(), and EINA_TRUE.
| EAPI Eina_Bool eio_file_associate_add | ( | Eio_File * | ls, |
| const char * | key, | ||
| const void * | data, | ||
| Eina_Free_Cb | free_cb | ||
| ) |
Associate data with the current filtered file.
| ls | The Eio_File ls request currently calling the filter callback. |
| key | The key to associate data to. |
| data | The data to associate the data to. |
| free_cb | Optionally a function to call to free the associated data, data is passed as the callback data parameter. If no free_cb is provided the user data remains untouched. |
This function can only be safely called from within the filter callback. If you don't need to copy the key around you can use eio_file_associate_direct_add
References EAPI, EINA_FALSE, eina_hash_add(), and eina_hash_string_small_new().
| EAPI Eina_Bool eio_file_associate_direct_add | ( | Eio_File * | ls, |
| const char * | key, | ||
| const void * | data, | ||
| Eina_Free_Cb | free_cb | ||
| ) |
Associate data with the current filtered file.
| ls | The Eio_File ls request currently calling the filter callback. |
| key | The key to associate data to (will not be copied, and the pointer will not be used as long as the file is not notified). |
| data | The data to associate the data to. |
| free_cb | The function to call to free the associated data, free_cb will be called if not specified. |
This function can only be safely called from within the filter callback. If you need eio to make a proper copy of the key to be safe use eio_file_associate_add instead.
References EAPI, EINA_FALSE, eina_hash_direct_add(), and eina_hash_string_small_new().
Get the data associated during the filter callback inside the main loop.
| ls | The Eio_File ls request currently calling the notify callback. |
| key | The key pointing to the data to retrieve. |
NULL if not found. References EAPI, and eina_hash_find().
|
inlinestatic |
get access time from a Eina_Stat
| stat | the structure to get the atime from |
This take care of doing type conversion to match rest of EFL time API.
|
inlinestatic |
get modification time from a Eina_Stat
| stat | the structure to get the mtime from |
This take care of doing type conversion to match rest of EFL time API.
|
inlinestatic |
get the size of the file described in Eina_Stat
| stat | the structure to get the size from |
tell if the stated path was a directory or not.
| stat | the structure to get the size from |