Eina_File_Group

Langue: en

Version: 381548 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

File -

Functions to traverse directories and split paths.

Defines


#define EINA_FILE_DIR_LIST_CB(function) ((Eina_File_Dir_List_Cb)function)
cast to an Eina_File_Dir_List_Cb.

Typedefs


typedef void(* Eina_File_Dir_List_Cb )(const char *name, const char *path, void *data)
Type for a callback.

Functions


EAPI Eina_Bool eina_file_dir_list (const char *dir, Eina_Bool recursive, Eina_File_Dir_List_Cb cb, void *data)
List all files on the directory calling the function for every file found.
EAPI Eina_Bool EAPI Eina_Array * eina_file_split (char *path)
Split a path according to the delimiter of the filesystem.

Detailed Description

Functions to traverse directories and split paths.

*
eina_file_dir_list() list the content of a directory, recusrsively or not, and can call a callback function for eachfound file.
*
eina_file_split() split a path into all the subdirectories that compose it, according to the separator of the file system.

Define Documentation

#define EINA_FILE_DIR_LIST_CB(function) ((Eina_File_Dir_List_Cb)function)

cast to an Eina_File_Dir_List_Cb. Parameters:

function The function to cast.

This macro casts function to Eina_File_Dir_List_Cb.

Function Documentation

EAPI Eina_Bool eina_file_dir_list (const char * dir, Eina_Bool recursive, Eina_File_Dir_List_Cb cb, void * data)

List all files on the directory calling the function for every file found. Parameters:

dir The directory name.
recursive Iterate recursively in the directory.
cb The callback to be called.
data The data to pass to the callback.

Returns:

EINA_TRUE on success, EINA_FALSE otherwise.

This function lists all the files in dir. To list also all the sub directoris recursively, recursive must be set to EINA_TRUE, otherwise it must be set to EINA_FALSE. For each found file, cb is called and data is passed to it.

If cb or dir are NULL, or if dir is a string of size 0, or if dir can not be opened, this function returns EINA_FALSE immediatly. otherwise, it returns EINA_TRUE.

EAPI Eina_Array * eina_file_split (char * path)

Split a path according to the delimiter of the filesystem. Parameters:

path The path to split.

Returns:

An array of the parts of the path to split.

This function splits path according to the delimiter of the used filesystem. If path is NULL or if the array can not be created, NULL is returned, otherwise, an array with the different parts of path is returned.

Author

Generated automatically by Doxygen for Eina from the source code.