Ecore_File.h File Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

Macros | Typedefs | Enumerations | Functions
Ecore_File.h File Reference

Files utility functions. More...

## Typedefs
typedef struct _Ecore_File_Monitor | Ecore_File_Monitor
| Abstract type used when monitoring a directory.
typedef struct _Ecore_File_Download_Job | Ecore_File_Download_Job
| Abstract type used when aborting a download.
typedef enum _Ecore_File_Event | Ecore_File_Event
typedef void(* | Ecore_File_Monitor_Cb) (void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path)
| Callback type used when a monitored directory has changes.
typedef void(* | Ecore_File_Download_Completion_Cb) (void *data, const char *file, int status)
| Callback type used when a download is finished.
typedef enum _Ecore_File_Progress_Return | Ecore_File_Progress_Return
typedef int(* | Ecore_File_Download_Progress_Cb) (void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow)
| Callback type used while a download is in progress.

## Enumerations
enum | _Ecore_File_Event { ECORE_FILE_EVENT_NONE, ECORE_FILE_EVENT_CREATED_FILE, ECORE_FILE_EVENT_CREATED_DIRECTORY, ECORE_FILE_EVENT_DELETED_FILE, ECORE_FILE_EVENT_DELETED_DIRECTORY, ECORE_FILE_EVENT_DELETED_SELF, ECORE_FILE_EVENT_MODIFIED, ECORE_FILE_EVENT_CLOSED }
| The event type returned when a file or directory is monitored. More...
enum | _Ecore_File_Progress_Return { ECORE_FILE_PROGRESS_CONTINUE = 0, ECORE_FILE_PROGRESS_ABORT = 1 }
| What to do with the download as a return from the Ecore_File_Download_Progress_Cb function, if provided. More...

## Functions
int | ecore_file_init ()
| Initialize the Ecore_File library. More...
int | ecore_file_shutdown ()
| Shut down the Ecore_File library. More...
long long | ecore_file_mod_time (const char *file)
| Get the time of the last modification to the given file. More...
long long | ecore_file_size (const char *file)
| Get the size of the given file. More...
Eina_Bool | ecore_file_exists (const char *file)
| Check if the given file exists. More...
Eina_Bool | ecore_file_is_dir (const char *file)
| Check if the given file is a directory. More...
Eina_Bool | ecore_file_mkdir (const char *dir)
| Create a new directory. More...
int | ecore_file_mkdirs (const char **dirs)
| Create complete directory in a batch. More...
int | ecore_file_mksubdirs (const char *base, const char **subdirs)
| Create complete list of sub-directories in a batch (optimized). More...
Eina_Bool | ecore_file_rmdir (const char *dir)
| Delete the given directory. More...
Eina_Bool | ecore_file_recursive_rm (const char *dir)
| Delete the given directory and all its contents. More...
Eina_Bool | ecore_file_mkpath (const char *path)
| Create a complete path. More...
int | ecore_file_mkpaths (const char **paths)
| Create complete paths in a batch. More...
Eina_Bool | ecore_file_cp (const char *src, const char *dst)
| Copy the given file to the given destination. More...
Eina_Bool | ecore_file_mv (const char *src, const char *dst)
| Move the given file to the given destination. More...
Eina_Bool | ecore_file_symlink (const char *src, const char *dest)
| Create a symbolic link. More...
char * | ecore_file_realpath (const char *file)
| Get the canonicalized absolute path name. More...
Eina_Bool | ecore_file_unlink (const char *file)
| Delete the given file. More...
Eina_Bool | ecore_file_remove (const char *file)
| Remove the given file or directory. More...
const char * | ecore_file_file_get (const char *path)
| Get the filename from a given path. More...
char * | ecore_file_dir_get (const char *file)
| Get the directory where the given file resides. More...
Eina_Bool | ecore_file_can_read (const char *file)
| Check if the given file can be read. More...
Eina_Bool | ecore_file_can_write (const char *file)
| Check if the given file can be written. More...
Eina_Bool | ecore_file_can_exec (const char *file)
| Check if the given file can be executed. More...
char * | ecore_file_readlink (const char *lnk)
| Get the path pointed by the given link. More...
Eina_List * | ecore_file_ls (const char *dir)
| Get the list of the files and directories in the given directory. More...
char * | ecore_file_app_exe_get (const char *app)
| Return the executable from the given command. More...
char * | ecore_file_escape_name (const char *filename)
| Add the escape sequence ('\') to the given file name. More...
char * | ecore_file_strip_ext (const char *path)
| Remove the extension from the given file name. More...
int | ecore_file_dir_is_empty (const char *dir)
| Check if the given directory is empty. More...
EAPI Ecore_File_Monitor * | ecore_file_monitor_add (const char *path, Ecore_File_Monitor_Cb func, void *data)
| Monitor the given path using inotify, Windows notification, or polling. More...
EAPI void | ecore_file_monitor_del (Ecore_File_Monitor *em)
| Stop the monitoring of the given path. More...
EAPI const char * | ecore_file_monitor_path_get (Ecore_File_Monitor *em)
| Get the monitored path. More...
EAPI Eina_Bool | ecore_file_path_dir_exists (const char *in_dir)
| Check if the given directory is in PATH. More...
EAPI Eina_Bool | ecore_file_app_installed (const char *exe)
| Check if the given application is installed. More...
EAPI Eina_List * | ecore_file_app_list (void)
| Get a list of all the applications installed on the system. More...
EAPI Eina_Bool | ecore_file_download (const char *url, const char *dst, Ecore_File_Download_Completion_Cb completion_cb, Ecore_File_Download_Progress_Cb progress_cb, void *data, Ecore_File_Download_Job **job_ret)
| Download the given url to the given destination. More...
EAPI Eina_Bool | ecore_file_download_full (const char *url, const char *dst, Ecore_File_Download_Completion_Cb completion_cb, Ecore_File_Download_Progress_Cb progress_cb, void *data, Ecore_File_Download_Job **job_ret, Eina_Hash *headers)
| Download the given url to the given destination with additional headers. More...
EAPI void | ecore_file_download_abort_all (void)
| Abort all downloads. More...
EAPI void | ecore_file_download_abort (Ecore_File_Download_Job *job)
| Abort the given download job and call the completion_cb callbck with a status of 1 (error). More...
EAPI Eina_Bool | ecore_file_download_protocol_available (const char *protocol)
| Check if the given protocol is available. More...

## Detailed Description

Files utility functions.