Implementation status: to be implemented
int dirfd(DIR *dirp);
dirfd() function computes a file descriptor referring to the same directory as the dirp argument. This file descriptor is closed by a call to
The file descriptor, or the state of the associated description, can be modified only by:
seekdir(). After attempt to close this descriptor another way, the behaviour is undefined.
dirp - a pointer to the DIR data structure.
On success an integer containing a file descriptor for the directory pointed to by dirp,
-1 is returned and
errno set to indicate the error.
EINVAL] - the dirp argument does not refer to a valid directory stream.
- Implement the