Tizen Native API  5.5
Eio file listing API

This functions helps list files asynchronously.

This set of functions work on top of Eina_File and Ecore_Thread to list files under various condition.

Functions

Eio_Fileeio_file_ls (const char *dir, Eio_Filter_Cb filter_cb, Eio_Main_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 List contents of a directory without locking your app.
Eio_Fileeio_file_direct_ls (const char *dir, Eio_Filter_Direct_Cb filter_cb, Eio_Main_Direct_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 List contents of a directory without locking your app.
Eio_Fileeio_file_stat_ls (const char *dir, Eio_Filter_Direct_Cb filter_cb, Eio_Main_Direct_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 List content of a directory without locking your app.
Eio_Fileeio_dir_stat_ls (const char *dir, Eio_Filter_Direct_Cb filter_cb, Eio_Main_Direct_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 List the content of a directory and all its sub-content asynchronously.
Eio_Fileeio_dir_direct_ls (const char *dir, Eio_Filter_Dir_Cb filter_cb, Eio_Main_Direct_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 List the content of a directory and all its sub-content asynchronously.
Eio_Fileeio_file_direct_stat (const char *path, Eio_Stat_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Stat a file/directory.

Typedefs

typedef struct _Eio_Progress Eio_Progress

Typedef Documentation

Progress information on a specific operation.


Function Documentation

Eio_File* eio_dir_direct_ls ( const char *  dir,
Eio_Filter_Dir_Cb  filter_cb,
Eio_Main_Direct_Cb  main_cb,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

List the content of a directory and all its sub-content asynchronously.

Parameters:
dirThe directory to list.
filter_cbCallback used to decide if the file will be passed to main_cb
main_cbCallback called from the main loop for each accepted file (not filtered).
done_cbCallback called from the main loop after the contents of the directory has been listed.
error_cbCallback called from the main loop when either the directory could not be opened or the operation has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

eio_dir_direct_ls() runs eina_file_direct_ls() recursively in a separate thread using ecore_thread_feedback_run(). This prevents any blocking in your apps. Every file will be passed to the filter_cb, so it's your job to decide if you want to pass the file to the main_cb or not. Return EINA_TRUE to pass it to the main_cb or EINA_FALSE to ignore it.

See also:
eio_file_direct_ls()
eio_dir_stat_ls()
eina_file_direct_ls()
ecore_thread_feedback_run()
Since :
3.0f(2.3.1)
Eio_File* eio_dir_stat_ls ( const char *  dir,
Eio_Filter_Direct_Cb  filter_cb,
Eio_Main_Direct_Cb  main_cb,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

List the content of a directory and all its sub-content asynchronously.

Parameters:
dirThe directory to list.
filter_cbCallback used to decide if the file will be passed to main_cb
main_cbCallback called from the main loop for each accepted file (not filtered).
done_cbCallback called from the main loop after the contents of the directory has been listed.
error_cbCallback called from the main loop when either the directory could not be opened or the operation has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

eio_dir_stat_ls() runs eina_file_stat_ls() recursively in a separate thread using ecore_thread_feedback_run(). This prevents any blocking in your apps. Every file will be passed to the filter_cb, so it's your job to decide if you want to pass the file to the main_cb or not. Return EINA_TRUE to pass it to the main_cb or EINA_FALSE to ignore it.

See also:
eio_file_stat_ls()
eio_dir_direct_ls()
eina_file_stat_ls()
ecore_thread_feedback_run()
Since :
3.0f(2.3.1)
Eio_File* eio_file_direct_ls ( const char *  dir,
Eio_Filter_Direct_Cb  filter_cb,
Eio_Main_Direct_Cb  main_cb,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

List contents of a directory without locking your app.

Parameters:
dirThe directory to list.
filter_cbCallback used to decide if the file will be passed to main_cb
main_cbCallback called from the main loop for each accepted file (not filtered).
done_cbCallback called from the main loop after the contents of the directory has been listed.
error_cbCallback called from the main loop when either the directory could not be opened or the operation has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

eio_file_direct_ls() runs eina_file_direct_ls() in a separate thread using ecore_thread_feedback_run(). This prevents any blocking in your apps. Every file will be passed to the filter_cb, so it's your job to decide if you want to pass the file to the main_cb or not. Return EINA_TRUE to pass it to the main_cb or EINA_FALSE to ignore it.

Warning:
If readdir_r doesn't contain file type information, file type is EINA_FILE_UNKNOWN.
Note:
The iterator walks over '.' and '..' without returning them.
The difference between this function and eina_file_stat_ls() is that it may not get the file type information however it is likely to be faster.
See also:
eio_file_stat_ls()
eina_file_direct_ls()
ecore_thread_feedback_run()
Since :
3.0f(2.3.1)
Eio_File* eio_file_direct_stat ( const char *  path,
Eio_Stat_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Stat a file/directory.

Parameters:
pathThe path to stat.
done_cbCallback called from the main loop when stat was successfully called.
error_cbCallback called from the main loop when stat failed or has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

eio_file_direct_stat calls stat in another thread. This prevents any blocking in your apps.

Since :
3.0f(2.3.1)
Eio_File* eio_file_ls ( const char *  dir,
Eio_Filter_Cb  filter_cb,
Eio_Main_Cb  main_cb,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

List contents of a directory without locking your app.

Parameters:
dirThe directory to list.
filter_cbCallback used to decide if the file will be passed to main_cb
main_cbCallback called for each listed file if it was not filtered.
done_cbCallback called when the ls operation is done.
error_cbCallback called when either the directory could not be opened or the operation has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

This function is responsible for listing the content of a directory without blocking your application. It's equivalent to the "ls" shell command. Every file will be passed to the filter_cb, so it's your job to decide if you want to pass the file to the main_cb or not. Return EINA_TRUE to pass it to the main_cb or EINA_FALSE to ignore it. It runs eina_file_ls() in a separate thread using ecore_thread_feedback_run().

See also:
eina_file_ls()
ecore_thread_feedback_run()
eio_file_direct_ls()
eio_file_stat_ls()
Since :
3.0f(2.3.1)
Eio_File* eio_file_stat_ls ( const char *  dir,
Eio_Filter_Direct_Cb  filter_cb,
Eio_Main_Direct_Cb  main_cb,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

List content of a directory without locking your app.

Parameters:
dirThe directory to list.
filter_cbCallback used to decide if the file will be passed to main_cb
main_cbCallback called from the main loop for each accepted file (not filtered).
done_cbCallback called from the main loop after the contents of the directory has been listed.
error_cbCallback called from the main loop when either the directory could not be opened or the operation has been canceled.
dataUnmodified user data passed to callbacks
Returns:
A reference to the I/O operation.

Every file will be passed to the filter_cb, so it's your job to decide if you want to pass the file to the main_cb or not. Return EINA_TRUE to pass it to the main_cb or EINA_FALSE to ignore it. eio_file_stat_ls() run eina_file_stat_ls() in a separate thread using ecore_thread_feedback_run().

Note:
The iterator walks over '.' and '..' without returning them.
The difference between this function and eio_file_direct_ls() is that it guarantees the file type information to be correct by incurring a possible performance penalty.
See also:
eio_file_stat_ls()
eina_file_stat_ls()
ecore_thread_feedback_run()
Since :
3.0f(2.3.1)