On Sat, Mar 28, 2026 at 11:46 PM raf <[email protected]> wrote: > On Sat, Mar 28, 2026 at 03:22:05PM +0000, James Youngman <[email protected]> > wrote: > > > What about "directory with no children" or "directory with no > descendants"? > > There's nothing ambiguous about "empty directory". Everyone knows > that all directories contain "." and "..". >
FWIW, POSIX doesn't require that and not all file systems have them. POSIX distinguishes the meaning of dot and dot-dot in pathname resolution <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16> (where they act as I'm sure you expect) and in the output of readdir <https://pubs.opengroup.org/onlinepubs/9799919799/functions/readdir.html#tag_17_477> (from which they may be absent without affecting pathname resolution). IOW to be strictly correct we would need to say: Zero-length file or a directory containing no entries (other than "." and > ".."). (I unilaterally suggested "zero-length" file because IMO "zero-byte" file invites nitpicking about confusion with a non-empty file containing bytes whose values are all zero.) Based on our discussion so far it seems some or perhaps all suggested clarifications (including my own) have provoked corrections and quibbles. Whereas the existing wording has survived a long time and generated no confusion or bug reports to date, so far as I can recall. Perhaps that indicates we should keep the current wording. James.
