A new feature on clib4 is the possibility to open() a directory. Of course you can't read() or write() on the directory but you can access the directory using fstat() function for example.
New flags are now supported by open:
If pathname is not a directory, cause the open to fail.
Obtain a file descriptor that can be used for two purposes:
read or write), fail with the error EBADF.The following operations can be performed on the resulting file descriptor:
closefchdir if the file descriptor refers to a directoryfstatfstatfsdup, fcntl(F_DUPFD, etc.)fcntl(F_GETFD and F_SETFD)fcntlwith F_GETFL operation: the returned flags will include the bit O_PATH.openat() and the other "at*() system calls.