symbolic links come to mind. there’s soft and hard symbolic links. soft links you probably know, it’s just one item in the tree that points to another. hard links are more intricate because you (the user) cannot easily differentiate them from an ordinary file / directory. it’s basically hacking the file system to lead you in circles. this way, a directory can contain itself, which means that it’s not a tree anymore.
Which is probably why Unix tends to disallow hardlinks to directories.
They’re not physically impossible; on Mac, Time Machine even creates them (there’s some kind of special thing it has to do to be allowed to do that, I think). The system design people just went “yeah, that’s a bad idea”.
Which is slightly impressive coming from the people who decided newlines in filenames were perfectly fine, on a system where it’s very common practice to sling data around as a list of lines.
(I like the fact that literally every other character is allowed. Including spaces. Dealing with spaces isn’t too terrible! It’d just be way easier to deal with things in a guaranteed correct fashion if newlines in filenames weren’t allowed.)
symbolic links come to mind. there’s soft and hard symbolic links. soft links you probably know, it’s just one item in the tree that points to another. hard links are more intricate because you (the user) cannot easily differentiate them from an ordinary file / directory. it’s basically hacking the file system to lead you in circles. this way, a directory can contain itself, which means that it’s not a tree anymore.
Which is probably why Unix tends to disallow hardlinks to directories.
They’re not physically impossible; on Mac, Time Machine even creates them (there’s some kind of special thing it has to do to be allowed to do that, I think). The system design people just went “yeah, that’s a bad idea”.
Which is slightly impressive coming from the people who decided newlines in filenames were perfectly fine, on a system where it’s very common practice to sling data around as a list of lines.
(I like the fact that literally every other character is allowed. Including spaces. Dealing with spaces isn’t too terrible! It’d just be way easier to deal with things in a guaranteed correct fashion if newlines in filenames weren’t allowed.)
– Frost