[TUHS] Quick Question: Early Filesystems and Name/Metadata Separation?
Leah Neukirchen via TUHS
tuhs at tuhs.org
Wed Sep 17 20:13:26 AEST 2025
Dan Cross via TUHS <tuhs at tuhs.org> writes:
> Lookups---the most common
> operation---remained simple: to retrieve the "next" entry in a
> directory, one need only add the offset from the current entry to that
> entry's position relative to the start of the directory file, but that
> was an extra step compared to what workaday programmers were used to
> doing (which was just opening the directory file read-only and, well,
> reading from it), so the `opendir`/`readdir`/`closedir` interfaces
> were added to hide this in the kernel and mimic the more traditional
> open/read/close loop.
And then we had to wait until POSIX.1-2024 until the "old" interface
became standardized (which is useful because opendir doesn't let you
specify buffer size).
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_getdents.html
--
Leah Neukirchen <leah at vuxu.org> https://leahneukirchen.org/
More information about the TUHS
mailing list