Eio.h File Reference

Eio asynchronous input/output library. More...

Data Structures

struct  _Eio_Version
 
struct  _Eio_Progress
 Represents the current progress of the operation. More...
 
struct  _Eio_Monitor_Error
 
struct  _Eio_Monitor_Event
 

Macros

#define EAPI
 
#define EIO_VERSION_MAJOR   EFL_VERSION_MAJOR
 
#define EIO_VERSION_MINOR   EFL_VERSION_MINOR
 

Typedefs

typedef struct _Eio_Version Eio_Version
 Represents the current version of EIO.
 
typedef struct _Eio_Monitor Eio_Monitor
 
typedef struct _Eio_Monitor_Error Eio_Monitor_Error
 
typedef struct _Eio_Monitor_Event Eio_Monitor_Event
 

Functions

EAPI Eio_Fileeio_file_xattr (const char *path, Eio_Filter_Cb filter_cb, Eio_Main_Cb main_cb, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Assynchronously list all eXtended attribute. More...
 
EAPI Eio_Fileeio_file_xattr_int_set (const char *path, const char *attribute, int xattr_int, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Define an extented attribute on a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_double_set (const char *path, const char *attribute, double xattr_double, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Define an extented attribute on a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_string_set (const char *path, const char *attribute, const char *xattr_string, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Define a string extented attribute on a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_set (const char *path, const char *attribute, const char *xattr_data, unsigned int xattr_size, Eina_Xattr_Flags flags, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Define an extented attribute on a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_get (const char *path, const char *attribute, Eio_Done_Data_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Retrieve the extended attribute of a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_int_get (const char *path, const char *attribute, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Retrieve a extended attribute of a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_double_get (const char *path, const char *attribute, Eio_Done_Double_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Retrieve a extended attribute of a file/directory. More...
 
EAPI Eio_Fileeio_file_xattr_string_get (const char *path, const char *attribute, Eio_Done_String_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Retrieve a string extended attribute of a file/directory. More...
 
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...
 
EAPI Eio_Fileeio_file_open (const char *name, Eina_Bool shared, Eio_Open_Cb open_cb, Eio_Error_Cb error_cb, const void *data)
 Assynchronously open a file. More...
 
EAPI Eio_Fileeio_file_close (Eina_File *f, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Assynchronously close a file. More...
 
EAPI Eio_Fileeio_file_map_all (Eina_File *f, Eina_File_Populate rule, Eio_Filter_Map_Cb filter_cb, Eio_Map_Cb map_cb, Eio_Error_Cb error_cb, const void *data)
 Assynchronously map a file in memory. More...
 
EAPI Eio_Fileeio_file_map_new (Eina_File *f, Eina_File_Populate rule, unsigned long int offset, unsigned long int length, Eio_Filter_Map_Cb filter_cb, Eio_Map_Cb map_cb, Eio_Error_Cb error_cb, const void *data)
 Assynchronously map a part of a file in memory. More...
 
EAPI Eio_Fileeio_eet_open (const char *filename, Eet_File_Mode mode, Eio_Eet_Open_Cb eet_cb, Eio_Error_Cb error_cb, const void *data)
 Open an eet file on disk, and returns a handle to it asynchronously. More...
 
EAPI Eio_Fileeio_eet_close (Eet_File *ef, Eio_Done_Cb done_cb, Eio_Eet_Error_Cb error_cb, const void *data)
 Close an eet file handle and flush pending writes asynchronously. More...
 
EAPI Eio_Fileeio_eet_sync (Eet_File *ef, Eio_Done_Cb done_cb, Eio_Eet_Error_Cb error_cb, const void *data)
 Sync content of an eet file handle, flushing pending writes asynchronously. More...
 
EAPI Eio_Fileeio_eet_data_write_cipher (Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, void *write_data, int compress, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write a data structure from memory and store in an eet file using a cipher asynchronously. More...
 
EAPI Eio_Fileeio_eet_data_read_cipher (Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, Eio_Done_ERead_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a data structure from an eet file and decodes it using a cipher asynchronously. More...
 
EAPI Eio_Fileeio_eet_data_image_write_cipher (Eet_File *ef, const char *name, const char *cipher_key, void *write_data, unsigned int w, unsigned int h, int alpha, int compress, int quality, int lossy, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write image data to the named key in an eet file asynchronously. More...
 
EAPI Eio_Fileeio_eet_read_direct (Eet_File *ef, const char *name, Eio_Done_Data_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a specified entry from an eet file and return data. More...
 
EAPI Eio_Fileeio_eet_read_cipher (Eet_File *ef, const char *name, const char *cipher_key, Eio_Done_Read_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a specified entry from an eet file and return data. More...
 
EAPI Eio_Fileeio_eet_write_cipher (Eet_File *ef, const char *name, void *write_data, int size, int compress, const char *cipher_key, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write a specified entry to an eet file handle using a cipher. More...
 
EAPI Eio_Monitor * eio_monitor_add (const char *path)
 Adds a file/directory to monitor (inotify mechanism) More...
 
EAPI Eio_Monitor * eio_monitor_stringshared_add (const char *path)
 Adds a file/directory to monitor. More...
 
EAPI void eio_monitor_del (Eio_Monitor *monitor)
 Deletes a path from the “watched” list. More...
 
EAPI const char * eio_monitor_path_get (Eio_Monitor *monitor)
 returns the path being watched by the given Eio_Monitor. More...
 

Variables

EAPI Eio_Versioneio_version
 
EAPI int EIO_MONITOR_FILE_CREATED
 A new file was created in a watched directory.
 
EAPI int EIO_MONITOR_FILE_DELETED
 A watched file was deleted, or a file in a watched directory was deleted.
 
EAPI int EIO_MONITOR_FILE_MODIFIED
 A file was modified in a watched directory.
 
EAPI int EIO_MONITOR_FILE_CLOSED
 A file was closed in a watched directory. More...
 
EAPI int EIO_MONITOR_DIRECTORY_CREATED
 A new directory was created in a watched directory.
 
EAPI int EIO_MONITOR_DIRECTORY_DELETED
 A directory has been deleted: this can be either a watched directory or one of its subdirectories.
 
EAPI int EIO_MONITOR_DIRECTORY_MODIFIED
 A directory has been modified in a watched directory.
 
EAPI int EIO_MONITOR_DIRECTORY_CLOSED
 A directory has been closed in a watched directory. More...
 
EAPI int EIO_MONITOR_SELF_RENAME
 The monitored path has been renamed, an error could happen just after if the renamed path doesn't exist.
 
EAPI int EIO_MONITOR_SELF_DELETED
 The monitored path has been removed.
 
EAPI int EIO_MONITOR_ERROR
 During operation the monitor failed and will no longer work. More...
 
enum  _Eio_File_Op {
  EIO_FILE_COPY,
  EIO_FILE_MOVE,
  EIO_DIR_COPY,
  EIO_DIR_MOVE,
  EIO_UNLINK,
  EIO_FILE_GETPWNAM,
  EIO_FILE_GETGRNAM
}
 Input/Output operations on files. More...
 
typedef enum _Eio_File_Op Eio_File_Op
 Input/Output operations on files.
 
typedef struct _Eio_File Eio_File
 Generic asynchronous I/O reference.
 
typedef struct _Eio_Progress Eio_Progress
 Progress information on a specific operation.
 
typedef Eina_Bool(* Eio_Filter_Cb) (void *data, Eio_File *handler, const char *file)
 
typedef void(* Eio_Main_Cb) (void *data, Eio_File *handler, const char *file)
 
typedef Eina_Bool(* Eio_Filter_Direct_Cb) (void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
 
typedef Eina_Bool(* Eio_Filter_Dir_Cb) (void *data, Eio_File *handler, Eina_File_Direct_Info *info)
 
typedef void(* Eio_Main_Direct_Cb) (void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
 
typedef void(* Eio_Stat_Cb) (void *data, Eio_File *handler, const Eina_Stat *stat)
 
typedef void(* Eio_Progress_Cb) (void *data, Eio_File *handler, const Eio_Progress *info)
 
typedef void(* Eio_Eet_Open_Cb) (void *data, Eio_File *handler, Eet_File *file)
 
typedef void(* Eio_Open_Cb) (void *data, Eio_File *handler, Eina_File *file)
 
typedef Eina_Bool(* Eio_Filter_Map_Cb) (void *data, Eio_File *handler, void *map, size_t length)
 
typedef void(* Eio_Map_Cb) (void *data, Eio_File *handler, void *map, size_t length)
 
typedef void(* Eio_Done_Data_Cb) (void *data, Eio_File *handler, const char *read_data, unsigned int size)
 
typedef void(* Eio_Done_String_Cb) (void *data, Eio_File *handler, const char *xattr_string)
 
typedef void(* Eio_Done_Double_Cb) (void *data, Eio_File *handler, double xattr_double)
 
typedef void(* Eio_Done_Int_Cb) (void *data, Eio_File *handler, int i)
 
typedef void(* Eio_Done_ERead_Cb) (void *data, Eio_File *handler, void *decoded)
 
typedef void(* Eio_Done_Read_Cb) (void *data, Eio_File *handler, void *read_data, unsigned int size)
 
typedef void(* Eio_Done_Cb) (void *data, Eio_File *handler)
 
typedef void(* Eio_Error_Cb) (void *data, Eio_File *handler, int error)
 
typedef void(* Eio_Eet_Error_Cb) (void *data, Eio_File *handler, Eet_Error err)
 
EAPI 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. More...
 
EAPI 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. More...
 
EAPI 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. More...
 
EAPI 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 it's sub-content asynchronously. More...
 
EAPI 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 it's sub-content asynchronously. More...
 
EAPI 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. More...
 
EAPI Eio_Fileeio_file_chmod (const char *path, mode_t mode, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Change right of a path. More...
 
EAPI Eio_Fileeio_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. More...
 
EAPI Eio_Fileeio_file_unlink (const char *path, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Unlink a file/directory. More...
 
EAPI Eio_Fileeio_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. More...
 
EAPI Eio_Fileeio_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. More...
 
EAPI Eio_Fileeio_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. More...
 
EAPI Eio_Fileeio_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 it's content asynchronously. More...
 
EAPI Eio_Fileeio_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 it's content asynchronously. More...
 
EAPI Eio_Fileeio_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 it's content asynchronously. More...
 

Detailed Description

Eio asynchronous input/output library.

These routines are used for Eio.

Enumeration Type Documentation

Input/Output operations on files.

This enum represents the operations that can be done.

Enumerator
EIO_FILE_COPY 

I/O operation is about a specific file copy.

EIO_FILE_MOVE 

I/O operation is about a specific file move.

EIO_DIR_COPY 

I/O operation is about a specific directory copy.

EIO_DIR_MOVE 

I/O operation is about a specific directory move.

EIO_UNLINK 

I/O operation is about destroying a path: source will point to base path to be destroyed, and dest will point to to path destroyed by this I/O.

EIO_FILE_GETPWNAM 

I/O operation is trying to get uid from user name.

EIO_FILE_GETGRNAM 

I/O operation is trying to get gid from user name.

Function Documentation

EAPI 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.

Examples:
eio_file_ls.c.

References EAPI, and eina_stringshare_add().

EAPI 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.

References EAPI, and eina_stringshare_add().

EAPI 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.

References EAPI, and eina_stringshare_add().

EAPI 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 it's 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.

References EAPI, and eina_stringshare_add().

EAPI 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 it's 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.

References eina_stringshare_add().

EAPI 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.

References EAPI, and eina_stringshare_add().

Referenced by eio_monitor_stringshared_add().

EAPI 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 right of a path.

Parameters
pathThe directory path to change access right.
modeThe permission to set, follow (mode & ~umask & 0777).
done_cbCallback called when the operation is completed.
error_cbCallback called from if something goes wrong.
dataUnmodified user data passed to callbacks.
Returns
A reference to the I/O operation.

Set a new permission of a path changing it to the mode passed as argument. It's equivalent to the chmod command.

References EAPI, and eina_stringshare_add().

EAPI 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.

Parameters
pathThe directory path to change owner.
userThe new user to set (can be NULL).
groupThe new group to set (can be NULL).
done_cbCallback called when the operation is completed.
error_cbCallback called from if something goes wrong.
dataUnmodified user data passed to callbacks
Returns
A reference to the I/O operation.

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.

References eina_stringshare_add().

EAPI 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.

Parameters
pathThe path to unlink.
done_cbCallback called when the operation is completed.
error_cbCallback called from if something goes wrong.
dataUnmodified user data passed to callbacks.
Returns
A reference to the I/O operation.

This function will erase a file.

References EAPI, and eina_stringshare_add().

EAPI 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.

Parameters
pathThe directory path to create.
modeThe permission to set, follow (mode & ~umask & 0777).
done_cbCallback called when the operation is completed.
error_cbCallback called from if something goes wrong.
dataUnmodified user data passed to callbacks
Returns
A reference to the I/O operation.

Creates a new directory using the mode provided.

References EAPI, and eina_stringshare_add().

EAPI 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.

Parameters
sourceShould be the name of the file to move the data from.
destShould be the name of the file to move the data to.
progress_cbCallback called to know the progress of the move.
done_cbCallback called when the move is done.
error_cbCallback called when something goes wrong.
dataUnmodified 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 right, but not user/group identification.

References eina_stringshare_add(), and EIO_FILE_MOVE.

EAPI 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.

Parameters
sourceShould be the name of the file to copy the data from.
destShould be the name of the file to copy the data to.
progress_cbCallback called to know the progress of the copy.
done_cbCallback called when the copy is done.
error_cbCallback called when something goes wrong.
dataUnmodified 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 right, but not user/group identification.

References EAPI, eina_stringshare_add(), and EIO_FILE_COPY.

EAPI 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 it's content asynchronously.

Parameters
sourceShould be the name of the directory to copy the data from.
destShould be the name of the directory to copy the data to.
filter_cbPossible to deny the move of some files/directories.
progress_cbCallback called to know the progress of the copy.
done_cbCallback called when the copy is done.
error_cbCallback called when something goes wrong.
dataUnmodified user data passed to callbacks

This function will move a directory and all it's 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 right, 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.

Note
if a rename occur, the filter callback will not be called.

References EAPI, eina_stringshare_add(), and EIO_DIR_MOVE.

EAPI 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 it's content asynchronously.

Parameters
sourceShould be the name of the directory to copy the data from.
destShould be the name of the directory to copy the data to.
filter_cbPossible to deny the move of some files/directories.
progress_cbCallback called to know the progress of the copy.
done_cbCallback called when the copy is done.
error_cbCallback called when something goes wrong.
dataUnmodified user data passed to callbacks

This function will copy a directory and all it's 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 right, 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.

References EAPI, eina_stringshare_add(), and EIO_DIR_COPY.

EAPI 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 it's content asynchronously.

Parameters
pathShould be the name of the directory to destroy.
filter_cbPossible to deny the move of some files/directories.
progress_cbCallback called to know the progress of the copy.
done_cbCallback called when the copy is done.
error_cbCallback called when something goes wrong.
dataUnmodified user data passed to callbacks

This function will remove a directory and all it's 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.

References EAPI, eina_stringshare_add(), and EIO_UNLINK.