|
VLC 4.0.0-dev
|
Functions | |
| 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_mkstemp (char *) |
| int | vlc_dup (int oldfd) |
| Duplicates a file descriptor. | |
| int | vlc_dup2 (int oldfd, int newfd) |
| Replaces a file descriptor. | |
| int | vlc_pipe (int[2]) |
| Creates a pipe (see "man pipe" for further reference). | |
| int | vlc_memfd (void) |
| Creates an anonymous regular file descriptor, i.e. | |
| ssize_t | vlc_write (int, const void *, size_t) |
| Writes data to a file descriptor. | |
| ssize_t | vlc_writev (int, const struct iovec *, int) |
| Writes data from an iovec structure to a file descriptor. | |
| int | vlc_close (int fd) |
| Closes a file descriptor. | |
| int vlc_close | ( | int | fd | ) |
Closes a file descriptor.
This closes a file descriptor. If this is a last file descriptor for the underlying open file, the file is closed too; the exact semantics depend on the type of file.
| fd | file descriptor |
A nul return value does not necessarily imply that all pending I/O succeeded, since I/O might still occur asynchronously afterwards.
| int vlc_dup | ( | int | oldfd | ) |
Duplicates a file descriptor.
| oldfd | file descriptor to duplicate |
errno) References likely.
Referenced by vlc_memfd().
| int vlc_dup2 | ( | int | oldfd, |
| int | newfd | ||
| ) |
Replaces a file descriptor.
This function duplicates a file descriptor to a specified file descriptor. This is primarily used to atomically replace a described file.
| oldfd | source file descriptor to copy |
| newfd | destination file descriptor to replace |
| newfd | success |
| -1 | failure (see errno) |
References vlc_cloexec().
| int vlc_memfd | ( | void | ) |
Creates an anonymous regular file descriptor, i.e.
a descriptor for a temporary file.
The file is initially empty. The storage space is automatically reclaimed when all file descriptors referencing it are closed.
The new file descriptor has the close-on-exec flag preset.
References vlc_dup(), and vlc_mkstemp().
Referenced by picture_Allocate().
| int vlc_mkstemp | ( | char * | template | ) |
References ARRAY_SIZE, vlc_open(), and vlc_rand_bytes().
Referenced by GetTmpFile(), and vlc_memfd().
| 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 ToLocaleDup, unlikely, and widen_path().
Referenced by config_SaveConfigFile(), vlc_fopen(), vlc_frame_FilePath(), vlc_mkstemp(), vlc_rand_init(), and WriteToFile().
| 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 |
| int vlc_pipe | ( | int | fds[2] | ) |
Creates a pipe (see "man pipe" for further reference).
The new file descriptors have the close-on-exec flag preset.
References vlc_cloexec(), and vlc_socketpair().
Referenced by vlc_getProxyUrl(), and vlc_poll_i11e_inner().
| ssize_t vlc_write | ( | int | fd, |
| const void * | buf, | ||
| size_t | len | ||
| ) |
Writes data to a file descriptor.
Unlike write(), if EPIPE error occurs, this function does not generate a SIGPIPE signal.
References vlc_writev().
| ssize_t vlc_writev | ( | int | fd, |
| const struct iovec * | iov, | ||
| int | count | ||
| ) |
Writes data from an iovec structure to a file descriptor.
Unlike writev(), if EPIPE error occurs, this function does not generate a SIGPIPE signal.
References count, and writev().
Referenced by vlc_write(), and vlc_writev_i11e().