
Defines | |
| #define | lstat(a, b) stat(a, b) |
Functions | |
| int | vlc_open (const char *filename, int flags,...) |
| Opens a system file handle. | |
| FILE * | vlc_fopen (const char *filename, const char *mode) |
| Opens a FILE pointer. | |
| int | vlc_openat (int dir, const char *filename, int flags,...) |
| Opens a system file handle relative to an existing directory handle. | |
| int | vlc_mkdir (const char *dirname, mode_t mode) |
| Creates a directory using UTF-8 paths. | |
| DIR * | vlc_opendir (const char *dirname) |
| Opens a DIR pointer. | |
| char * | vlc_readdir (DIR *dir) |
| Reads the next file name from an open directory. | |
| static int | dummy_select (const char *str) |
| int | vlc_loaddir (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(). | |
| static int | vlc_statEx (const char *filename, struct stat *buf, bool deref) |
| int | vlc_stat (const char *filename, struct stat *buf) |
| Finds file/inode information, as stat(). | |
| int | vlc_lstat (const char *filename, struct stat *buf) |
| Finds file/inode information, as lstat(). | |
| int | vlc_unlink (const char *filename) |
| Removes a file. | |
| int | vlc_rename (const char *oldpath, const char *newpath) |
| Moves a file atomically. | |
| int | vlc_mkstemp (char *template) |
| int | vlc_dup (int oldfd) |
| Duplicates a file descriptor. | |
| int | vlc_socket (int pf, int type, int proto, bool nonblock) |
| Creates a socket file descriptor. | |
| int | vlc_accept (int lfd, struct sockaddr *addr, socklen_t *alen, bool nonblock) |
| Accepts an inbound connection request on a listening socket. | |
| #define lstat | ( | a, | ||
| b | ||||
| ) | stat(a, b) |
Referenced by vlc_statEx().
| static int dummy_select | ( | const char * | str | ) | [static] |
| int vlc_accept | ( | int | lfd, | |
| struct sockaddr * | addr, | |||
| socklen_t * | alen, | |||
| bool | nonblock | |||
| ) |
Accepts an inbound connection request on a listening socket.
The new file descriptor has the close-on-exec flag set.
| lfd | listening socket file descriptor | |
| addr | pointer to the peer address or NULL [OUT] | |
| alen | pointer to the length of the peer address or NULL [OUT] | |
| nonblock | whether to put the new socket in non-blocking mode |
Referenced by httpd_HostThread(), and net_AcceptSingle().
| int vlc_dup | ( | int | oldfd | ) |
Duplicates a file descriptor.
The new file descriptor has the close-on-exec descriptor flag set.
References likely, and vlc_open().
| FILE* vlc_fopen | ( | const char * | filename, | |
| const char * | mode | |||
| ) |
Opens a FILE pointer.
| filename | file path, using UTF-8 encoding | |
| mode | fopen file open mode |
References vlc_open().
Referenced by ACL_LoadFile(), config_OpenConfigFile(), ImageWriteUrl(), libvlc_InternalInit(), playlist_Export(), playlist_SaveArt(), TsStorageNew(), and vout_snapshot_SaveImage().
| int vlc_loaddir | ( | 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 unlikely, and vlc_readdir().
Referenced by vlc_scandir().
| int vlc_lstat | ( | const char * | filename, | |
| struct stat * | buf | |||
| ) |
Finds file/inode information, as lstat().
Consider using fstat() instead, if possible.
| filename | UTF-8 file path |
References vlc_statEx().
| int vlc_mkdir | ( | const char * | dirname, | |
| mode_t | mode | |||
| ) |
Creates a directory using UTF-8 paths.
| dirname | a UTF-8 string with the name of the directory that you want to create. | |
| mode | directory permissions |
References LocaleFree(), and ToLocale().
Referenced by ArtCacheCreateDir(), config_CreateDir(), and GetTmpPath().
| int vlc_mkstemp | ( | char * | template | ) |
References vlc_open(), and vlc_rand_bytes().
Referenced by GetTmpFile().
| int vlc_open | ( | const char * | filename, | |
| int | flags, | |||
| ... | ||||
| ) |
Opens a system file handle.
| filename | file path to open (with UTF-8 encoding) | |
| flags | open() flags, see the C library open() documentation |
References ap, LocaleFree(), ToLocale(), va_end(), and va_start().
Referenced by SaveConfigFile(), vlc_dup(), vlc_fopen(), vlc_mkstemp(), and vlc_rand_init().
| int vlc_openat | ( | int | dir, | |
| const char * | filename, | |||
| int | flags, | |||
| ... | ||||
| ) |
Opens a system file handle relative to an existing directory handle.
| dir | directory file descriptor | |
| filename | file path to open (with UTF-8 encoding) | |
| flags | open() flags, see the C library open() documentation |
References ap, LocaleFree(), ToLocale(), va_end(), and va_start().
| DIR* vlc_opendir | ( | const char * | dirname | ) |
Opens a DIR pointer.
| dirname | UTF-8 representation of the directory name |
References LocaleFree(), and ToLocale().
Referenced by input_CreateFilename(), playlist_FindArtInCache(), subtitles_Detect(), vlc_scandir(), and vout_snapshot_SaveImage().
| char* vlc_readdir | ( | DIR * | dir | ) |
Reads the next file name from an open directory.
| dir | The directory that is being read |
References vlc_fix_readdir().
Referenced by playlist_FindArtInCache(), subtitles_Detect(), and vlc_loaddir().
| int vlc_rename | ( | const char * | oldpath, | |
| const char * | newpath | |||
| ) |
Moves a file atomically.
This only works within a single file system.
| oldpath | path to the file before the move | |
| newpath | intended path to the file after the move |
References LocaleFree(), and ToLocale().
Referenced by SaveConfigFile().
| 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 diretory path | |
| pointer | [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. |
References vlc_loaddir(), and vlc_opendir().
| int vlc_socket | ( | int | pf, | |
| int | type, | |||
| int | proto, | |||
| bool | nonblock | |||
| ) |
Creates a socket file descriptor.
The new file descriptor has the close-on-exec flag set.
| pf | protocol family | |
| type | socket type | |
| proto | network protocol | |
| nonblock | true to create a non-blocking socket |
Referenced by net_Socket().
| int vlc_stat | ( | const char * | filename, | |
| struct stat * | buf | |||
| ) |
Finds file/inode information, as stat().
Consider using fstat() instead, if possible.
| filename | UTF-8 file path |
References vlc_statEx().
Referenced by GetTmpPath(), InputGetExtraFilesPattern(), playlist_MLLoad(), playlist_SaveArt(), SubtitleAdd(), subtitles_Detect(), and vout_snapshot_SaveImage().
| static int vlc_statEx | ( | const char * | filename, | |
| struct stat * | buf, | |||
| bool | deref | |||
| ) | [static] |
References LocaleFree(), lstat, and ToLocale().
Referenced by vlc_lstat(), and vlc_stat().
| int vlc_unlink | ( | const char * | filename | ) |
Removes a file.
| filename | a UTF-8 string with the name of the file you want to delete. |
References LocaleFree(), and ToLocale().
Referenced by SaveConfigFile(), and TsStorageDelete().
1.7.1