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

EAPI int ecore_file_init (void)
 Initializes the Ecore_File library. More...
 
EAPI int ecore_file_shutdown (void)
 Shuts down the Ecore_File library. More...
 
EAPI long long ecore_file_mod_time (const char *file)
 Gets the time of the last modification to the given file. More...
 
EAPI long long ecore_file_size (const char *file)
 Gets the size of the given file. More...
 
EAPI Eina_Bool ecore_file_exists (const char *file)
 Checks if the given file exists. More...
 
EAPI Eina_Bool ecore_file_is_dir (const char *file)
 Checks if the given file is a directory. More...
 
EAPI Eina_Bool ecore_file_mkdir (const char *dir)
 Creates a new directory. More...
 
EAPI int ecore_file_mkdirs (const char **dirs)
 Creates complete directory in a batch. More...
 
EAPI int ecore_file_mksubdirs (const char *base, const char **subdirs)
 Creates complete list of sub-directories in a batch (optimized). More...
 
EAPI Eina_Bool ecore_file_rmdir (const char *dir)
 Deletes the given empty directory. More...
 
EAPI Eina_Bool ecore_file_recursive_rm (const char *dir)
 Deletes the given directory and all its contents. More...
 
EAPI Eina_Bool ecore_file_mkpath (const char *path)
 Creates a complete path. More...
 
EAPI int ecore_file_mkpaths (const char **paths)
 Creates complete paths in a batch. More...
 
EAPI Eina_Bool ecore_file_cp (const char *src, const char *dst)
 Copies the given file to the given destination. More...
 
EAPI Eina_Bool ecore_file_mv (const char *src, const char *dst)
 Moves the given file to the given destination. More...
 
EAPI Eina_Bool ecore_file_symlink (const char *src, const char *dest)
 Creates a symbolic link. More...
 
EAPI char * ecore_file_realpath (const char *file)
 Gets the canonicalized absolute path name. More...
 
EAPI Eina_Bool ecore_file_unlink (const char *file)
 Deletes the given file. More...
 
EAPI Eina_Bool ecore_file_remove (const char *file)
 Removes the given file or directory. More...
 
EAPI const char * ecore_file_file_get (const char *path)
 Gets the filename from a given path. More...
 
EAPI char * ecore_file_dir_get (const char *file)
 Gets the directory where the given file resides. More...
 
EAPI Eina_Bool ecore_file_can_read (const char *file)
 Checks if the given file can be read. More...
 
EAPI Eina_Bool ecore_file_can_write (const char *file)
 Checks if the given file can be written. More...
 
EAPI Eina_Bool ecore_file_can_exec (const char *file)
 Checks if the given file can be executed. More...
 
EAPI char * ecore_file_readlink (const char *link)
 Gets the path pointed by the given link. More...
 
EAPI Eina_Listecore_file_ls (const char *dir)
 Gets the list of the files and directories in the given directory. More...
 
EAPI char * ecore_file_app_exe_get (const char *app)
 Returns the executable from the given command. More...
 
EAPI char * ecore_file_escape_name (const char *filename)
 Adds the escape sequence ('\') to the given file name. More...
 
EAPI char * ecore_file_strip_ext (const char *path)
 Removes the extension from the given file name. More...
 
EAPI int ecore_file_dir_is_empty (const char *dir)
 Checks if the given directory is empty. More...
 
EAPI Ecore_File_Monitorecore_file_monitor_add (const char *path, Ecore_File_Monitor_Cb func, void *data)
 Monitors the given path using inotify, Windows notification, or polling. More...
 
EAPI void ecore_file_monitor_del (Ecore_File_Monitor *em)
 Stops the monitoring of the given path. More...
 
EAPI const char * ecore_file_monitor_path_get (Ecore_File_Monitor *em)
 Gets the monitored path. More...
 
EAPI Eina_Bool ecore_file_path_dir_exists (const char *in_dir)
 Checks if the given directory is in PATH. More...
 
EAPI Eina_Bool ecore_file_app_installed (const char *exe)
 Checks if the given application is installed. More...
 
EAPI Eina_Listecore_file_app_list (void)
 Gets 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)
 Downloads 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)
 Downloads the given url to the given destination with additional headers. More...
 
EAPI void ecore_file_download_abort_all (void)
 Aborts all downloads. More...
 
EAPI void ecore_file_download_abort (Ecore_File_Download_Job *job)
 Aborts the given download job and call the completion_cb callback with a status of 1 (error). More...
 
EAPI Eina_Bool ecore_file_download_protocol_available (const char *protocol)
 Checks if the given protocol is available. More...
 

Detailed Description

Files utility functions.