|
VLC
2.1.0-git
|

Data Structures | |
| struct | vlc_DIR |
Macros | |
| #define | CONVERT_PATH(path, wpath, err) |
Typedefs | |
| typedef struct vlc_DIR | vlc_DIR |
Functions | |
| static wchar_t * | widen_path (const char *path) |
| int | vlc_open (const char *filename, int flags,...) |
| Opens a system file handle. | |
| 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. | |
| char * | vlc_getcwd (void) |
| Determines the current working directory. | |
| DIR * | vlc_opendir (const char *dirname) |
| Opens a DIR pointer. | |
| char * | vlc_readdir (DIR *dir) |
| Reads the next file name from an open directory. | |
| 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_dup (int oldfd) |
| Duplicates a file descriptor. | |
| int | vlc_pipe (int fds[2]) |
| Creates a pipe (see "man pipe" for further reference). | |
| 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 CONVERT_PATH | ( | path, | |
| wpath, | |||
| err | |||
| ) |
| 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 |
| int vlc_dup | ( | int | oldfd | ) |
Duplicates a file descriptor.
The new file descriptor has the close-on-exec descriptor flag set.
References likely.
| char* vlc_getcwd | ( | void | ) |
Determines the current working directory.
References getenv(), ToLocaleDup, and unlikely.
| 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_stat(), and 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, ToLocale, unlikely, and widen_path().
| 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 LocaleFree, ToLocale, and widen_path().
| 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 |
| DIR* vlc_opendir | ( | const char * | dirname | ) |
Opens a DIR pointer.
| dirname | UTF-8 representation of the directory name |
References vlc_DIR::insert_dot_dot, LocaleFree, ToLocale, unlikely, vlc_DIR::wdir, and widen_path().
| int vlc_pipe | ( | int | fds[2] | ) |
Creates a pipe (see "man pipe" for further reference).
| char* vlc_readdir | ( | DIR * | dir | ) |
Reads the next file name from an open directory.
| dir | The directory that is being read |
References dirfd(), FromLocaleDup, vlc_DIR::insert_dot_dot, strdup(), unlikely, and vlc_DIR::wdir.
| 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, ToLocale, and widen_path().
| 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 |
| 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 static_assert, vlc_statEx(), and widen_path().
| 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, ToLocale, unlikely, and widen_path().
|
static |
Referenced by vlc_mkdir(), vlc_open(), vlc_opendir(), vlc_rename(), vlc_stat(), and vlc_unlink().
1.8.1.2