Assign a pathname to a file descriptor
#include <unistd.h> int flink( int fd, const char *path );
- The file descriptor.
- The path you want to associate with the file descriptor.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The flink() function assigns the pathname, path, to the file associated with the file descriptor, fd.
- An error occurred; errno is set.
- A component of either path prefix denies search permission, or the link named by path is in a directory with a mode that denies write permission.
- The file descriptor fd is invalid.
- The link named by path already exists.
- Too many levels of symbolic links or prefixes.
- The number of links to the file would exceed LINK_MAX.
- The length of the path string exceeds PATH_MAX, or a pathname component is longer than NAME_MAX.
- This error code can mean the following:
- A component of either path prefix doesn't exist.
- The path points to an empty string.
- The directory that would contain the link can't be extended.
- The flink() function isn't implemented for the filesystem specified in path.
- A component of either path prefix isn't a directory.
- The requested link requires writing in a directory on a read-only file system.
- The link named by path is on a different logical disk.
Last modified: 2013-12-23