VLC 4.0.0-dev
|
Typedefs | |
typedef DIR | vlc_DIR |
Functions | |
vlc_DIR * | vlc_opendir (const char *dirname) |
Opens a DIR pointer. | |
const char * | vlc_readdir (vlc_DIR *dir) |
Reads the next file name from an open directory. | |
int | vlc_loaddir (vlc_DIR *dir, char ***namelist, int(*select)(const char *), int(*compar)(const char **, const char **)) |
Does the same as vlc_scandir(), but takes an open directory pointer instead of a directory path. | |
int | vlc_scandir (const char *dirname, char ***namelist, int(*select)(const char *), int(*compar)(const char **, const char **)) |
Selects file entries from a directory, as GNU C scandir(). | |
void | vlc_closedir (vlc_DIR *dir) |
void | vlc_rewinddir (vlc_DIR *dir) |
int | vlc_mkdir (const char *dirname, mode_t mode) |
Creates a directory. | |
int | vlc_mkdir_parent (const char *dirname, mode_t mode) |
Creates a directory and parent directories as needed. | |
char * | vlc_getcwd (void) |
Determines the current working directory. | |
typedef DIR vlc_DIR |
void vlc_closedir | ( | vlc_DIR * | dir | ) |
References vlc_DIR::entry, vlc_DIR::fHandle, and vlc_DIR::wildcard.
char * vlc_getcwd | ( | void | ) |
Determines the current working directory.
References getenv(), ToLocaleDup, and unlikely.
Referenced by vlc_path2uri().
int vlc_loaddir | ( | vlc_DIR * | dir, |
char *** | namelist, | ||
int(*)(const char *) | select, | ||
int(*)(const char **, const char **) | compar | ||
) |
Does the same as vlc_scandir(), but takes an open directory pointer instead of a directory path.
References compar, compar_void(), dummy_select(), likely, strdup(), unlikely, vlc_qsort(), vlc_readdir(), and vlc_rewinddir().
Referenced by vlc_scandir().
int vlc_mkdir | ( | const char * | dirname, |
mode_t | mode | ||
) |
Creates a directory.
dirname | a UTF-8 string with the name of the directory that you want to create. |
mode | directory permissions |
References ToLocaleDup, unlikely, and widen_path().
Referenced by config_GetHomeDir(), GetTmpFile(), and vlc_mkdir_parent().
int vlc_mkdir_parent | ( | const char * | dirname, |
mode_t | mode | ||
) |
Creates a directory and parent directories as needed.
dirname | a UTF-8 string containing the name of the directory to be created. |
mode | directory permissions |
Creates a directory and parent directories as needed.
References DIR_SEP_CHAR, strdup(), and vlc_mkdir().
Referenced by ArtCacheCreateDir(), and config_CreateDir().
vlc_DIR * vlc_opendir | ( | const char * | dirname | ) |
Opens a DIR pointer.
dirname | UTF-8 representation of the directory name |
References vlc_DIR::drives, vlc_DIR::entry, vlc_DIR::eol, vlc_DIR::fHandle, vlc_DIR::insert_dot_dot, strdup(), ToLocaleDup, vlc_DIR::u, unlikely, vlc_DIR::wdir, and vlc_DIR::wildcard.
Referenced by input_FindArtInCache(), subtitles_Detect(), and vlc_scandir().
const char * vlc_readdir | ( | vlc_DIR * | dir | ) |
Reads the next file name from an open directory.
dir | directory handle as returned by vlc_opendir() (must not be used by another thread concurrently) |
References vlc_DIR::drives, vlc_DIR::entry, vlc_DIR::eol, vlc_DIR::fHandle, vlc_DIR::insert_dot_dot, strdup(), vlc_DIR::u, and vlc_DIR::wdir.
void vlc_rewinddir | ( | vlc_DIR * | dir | ) |
References vlc_DIR::drives, vlc_DIR::fHandle, vlc_DIR::u, vlc_DIR::wdir, and vlc_DIR::wildcard.
int vlc_scandir | ( | const char * | dirname, |
char *** | namelist, | ||
int(*)(const char *) | select, | ||
int(*)(const char **, const char **) | compar | ||
) |
Selects file entries from a directory, as GNU C scandir().
dirname | UTF-8 directory path |
namelist | [OUT] pointer set, on successful completion, to the address of a table of UTF-8 filenames. All filenames must be freed with free(). The table itself must be freed with free() as well. |
select | a function filtering out elements where it returns 0 |
compar | a function ordering pair of filtered elements |
References compar, vlc_closedir(), vlc_loaddir(), and vlc_opendir().