2 ms·
> I don't even know any modern unix, where directory is a file. On Linux? You `open()` a directory, and `getdents()` takes that file descriptor as input.
by zokier 8y ago
> I don't even know any modern unix, where directory is a file.
On Linux? You `open()` a directory, and `getdents()` takes that file descriptor as input.
- gaius 8y agoYou `open()` a directory, and `getdents()` takes that file descriptor as input. “These are not the interfaces you are interested in. Look at readdir(3) for the POSIX-conforming C library interface.” — getdents manpage