Tizen Native API
5.5
|
A set of function to manage file asynchronously.
The function provided by this API are the one useful for any file manager. Like moving or copying a file, unlinking it, changing it's access right, ...
Functions | |
Eio_File * | eio_file_chmod (const char *path, mode_t mode, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Change rights of a path. | |
Eio_File * | eio_file_chown (const char *path, const char *user, const char *group, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Change owner of a path. | |
Eio_File * | eio_file_unlink (const char *path, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Unlink a file/directory. | |
Eio_File * | eio_file_mkdir (const char *path, mode_t mode, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Create a new directory. | |
Eio_File * | eio_file_move (const char *source, const char *dest, Eio_Progress_Cb progress_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Move a file asynchronously. | |
Eio_File * | eio_file_copy (const char *source, const char *dest, Eio_Progress_Cb progress_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Copy a file asynchronously. | |
Eio_File * | eio_dir_move (const char *source, const char *dest, Eio_Filter_Direct_Cb filter_cb, Eio_Progress_Cb progress_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Move a directory and its content asynchronously. | |
Eio_File * | eio_dir_copy (const char *source, const char *dest, Eio_Filter_Direct_Cb filter_cb, Eio_Progress_Cb progress_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Copy a directory and its content asynchronously. | |
Eio_File * | eio_dir_unlink (const char *path, Eio_Filter_Direct_Cb filter_cb, Eio_Progress_Cb progress_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Remove a directory and its content asynchronously. |
Eio_File* eio_dir_copy | ( | const char * | source, |
const char * | dest, | ||
Eio_Filter_Direct_Cb | filter_cb, | ||
Eio_Progress_Cb | progress_cb, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Copy a directory and its content asynchronously.
source | Should be the name of the directory to copy the data from. |
dest | Should be the name of the directory to copy the data to. |
filter_cb | Possible to deny the move of some files/directories. |
progress_cb | Callback called to know the progress of the copy. |
done_cb | Callback called when the copy is done. |
error_cb | Callback called when something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will copy a directory and all its content from source to dest. It will try to use splice if possible, if not it will fallback to mmap/write. It will try to preserve access rights, but not user/group identity. 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* eio_dir_move | ( | const char * | source, |
const char * | dest, | ||
Eio_Filter_Direct_Cb | filter_cb, | ||
Eio_Progress_Cb | progress_cb, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Move a directory and its content asynchronously.
source | Should be the name of the directory to copy the data from. |
dest | Should be the name of the directory to copy the data to. |
filter_cb | Possible to deny the move of some files/directories. |
progress_cb | Callback called to know the progress of the copy. |
done_cb | Callback called when the copy is done. |
error_cb | Callback called when something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will move a directory and all its content from source to dest. It will try first to rename the directory, if not it will try to use splice if possible, if not it will fallback to mmap/write. It will try to preserve access rights, but not user/group identity. 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* eio_dir_unlink | ( | const char * | path, |
Eio_Filter_Direct_Cb | filter_cb, | ||
Eio_Progress_Cb | progress_cb, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Remove a directory and its content asynchronously.
path | Should be the name of the directory to destroy. |
filter_cb | Possible to deny the move of some files/directories. |
progress_cb | Callback called to know the progress of the copy. |
done_cb | Callback called when the copy is done. |
error_cb | Callback called when something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will remove a directory and all its content. 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* eio_file_chmod | ( | const char * | path, |
mode_t | mode, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Change rights of a path.
path | The directory path to change access rights. |
mode | The permission to set, follow (mode & ~umask & 0777). |
done_cb | Callback called when the operation is completed. |
error_cb | Callback called from if something goes wrong. |
data | Unmodified user data passed to callbacks. |
Set a new permission of a path changing it to the mode passed as argument. It's equivalent to the chmod command.
Eio_File* eio_file_chown | ( | const char * | path, |
const char * | user, | ||
const char * | group, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Change owner of a path.
path | The directory path to change owner. |
user | The new user to set (can be NULL). |
group | The new group to set (can be NULL). |
done_cb | Callback called when the operation is completed. |
error_cb | Callback called from if something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will change the owner of a path, setting it to the user and group passed as argument. It's equivalent to the chown shell command.
NULL
. Eio_File* eio_file_copy | ( | const char * | source, |
const char * | dest, | ||
Eio_Progress_Cb | progress_cb, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Copy a file asynchronously.
source | Should be the name of the file to copy the data from. |
dest | Should be the name of the file to copy the data to. |
progress_cb | Callback called to know the progress of the copy. |
done_cb | Callback called when the copy is done. |
error_cb | Callback called when something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will copy a file from source to dest. It will try to use splice if possible, if not it will fallback to mmap/write. It will try to preserve access rights, but not user/group identification.
Eio_File* eio_file_mkdir | ( | const char * | path, |
mode_t | mode, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Create a new directory.
path | The directory path to create. |
mode | The permission to set, follow (mode & ~umask & 0777). |
done_cb | Callback called when the operation is completed. |
error_cb | Callback called from if something goes wrong. |
data | Unmodified user data passed to callbacks |
Creates a new directory using the mode provided.
Eio_File* eio_file_move | ( | const char * | source, |
const char * | dest, | ||
Eio_Progress_Cb | progress_cb, | ||
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Move a file asynchronously.
source | Should be the name of the file to move the data from. |
dest | Should be the name of the file to move the data to. |
progress_cb | Callback called to know the progress of the move. |
done_cb | Callback called when the move is done. |
error_cb | Callback called when something goes wrong. |
data | Unmodified user data passed to callbacks |
This function will copy a file from source to dest. It will try to use splice if possible, if not it will fallback to mmap/write. It will try to preserve access rights, but not user/group identification.
Eio_File* eio_file_unlink | ( | const char * | path, |
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Unlink a file/directory.
path | The path to unlink. |
done_cb | Callback called when the operation is completed. |
error_cb | Callback called from if something goes wrong. |
data | Unmodified user data passed to callbacks. |
This function will erase a file.