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.
Function Documentation
Associate data with the current filtered file.
- Parameters:
-
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. |
- Returns:
- EINA_TRUE if insertion was fine.
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
- Since :
- 3.0
Associate data with the current filtered file.
- Parameters:
-
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. |
- Returns:
- EINA_TRUE if insertion was fine.
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.
- Since :
- 3.0
Get the data associated during the filter callback inside the main loop.
- Parameters:
-
ls | The Eio_File ls request currently calling the notify callback. |
key | The key pointing to the data to retrieve. |
- Returns:
- the data associated with the key or
NULL
if not found.
- Since :
- 3.0
get access time from a Eina_Stat
- Parameters:
-
stat | the structure to get the atime from |
- Returns:
- the last accessed time
This take care of doing type conversion to match rest of EFL time API.
- Note:
- some filesystem don't update that information.
Cancel any Eio_File.
- Parameters:
-
ls | The asynchronous I/O operation to cancel. |
- Returns:
- EINA_FALSE if the destruction is delayed, EINA_TRUE if it's done.
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.
- Since :
- 3.0
Check if an Eio_File operation has been cancelled.
- Parameters:
-
ls | The asynchronous I/O operation to check. |
- Returns:
- EINA_TRUE if it was canceled, EINA_FALSE other wise.
In case of an error it also return EINA_TRUE.
- Since :
- 3.0
Return the container during EIO operation.
- Parameters:
-
ls | The asynchronous I/O operation to retrieve container from. |
- Returns:
- NULL if not available, a DIRP if it is.
This is only available and make sense in the thread callback, not in the mainloop.
- Since :
- 3.0
tell if the stated path was a directory or not.
- Parameters:
-
stat | the structure to get the size from |
- Returns:
- EINA_TRUE, if it was.
tell if the stated path was a link or not.
- Parameters:
-
stat | the structure to get the size from |
- Returns:
- EINA_TRUE, if it was.
get modification time from a Eina_Stat
- Parameters:
-
stat | the structure to get the mtime from |
- Returns:
- the last modification time
This take care of doing type conversion to match rest of EFL time API.
get the size of the file described in Eina_Stat
- Parameters:
-
stat | the structure to get the size from |
- Returns:
- the size of the file
Initialize eio and all its required submodule.
- Returns:
- the current number of eio users.
- Since :
- 3.0
Get the actual limit to the maximum amount of memory used.
- Returns:
- The current limit being set.
- Since (EFL) :
- 1.10
- See also:
- eio_memory_burst_limit_set
- Since :
- 3.0
Set the limit to the maximum amount of memory used.
- Parameters:
-
limit | The actual limit to set. |
Eio work by burst, allocating memory in a thread and moving it back to the main loop. This result in quite some huge memory usage if the main loop is to slow to cope with the speed of the thread. By setting this limit, the thread will block until enough memory has been freed to be below the limit again.
By default no limit is set and any value < 0 will mean no limit.
- Note:
- You should give at least a reasonable amount of memory or the thread might stall.
- Since (EFL) :
- 1.10
- Since :
- 3.0
Shutdown eio and all its submodule if possible.
- Returns:
- the number of pending users of eio.
- Since :
- 3.0