News for hackers. Stuff that matters.
Re:The everything-is-a-file principle – Linus Torvalds by zokier on Saturday July 14, 2018 @06:34PM (#17532758)
> 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.

Re:The everything-is-a-file principle – Linus Torvalds by gaius on Sunday July 15, 2018 @03:58AM (#17534276)
You `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