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
 The event type returned when a file or directory is monitored.
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
 What to do with the download as a return from the Ecore_File_Download_Progress_Cb function, if provided.
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
}
enum  _Ecore_File_Progress_Return {
  ECORE_FILE_PROGRESS_CONTINUE = 0,
  ECORE_FILE_PROGRESS_ABORT = 1
}

Functions

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

Detailed Description

Files utility functions.