What are the advantages of implementing directories as files with special semantics (as in Unix) rather than as special O/S structures (as in MS-DOS)?
The main advantage is simplicity and elegance of design. In practical terms, this allows a somewhat uniform interface for files and directories. For instance, the `mv’ command on Unix can be used to move not just files but entire directories from one location to another, and the implementation is the same, since a directory is like an ordinary file.
Related Questions
- What are the advantages of implementing directories as files with special semantics (as in Unix) rather than as special O/S structures (as in MS-DOS)?
- Do we have to worry about directories being entered using the special unix symbol ~ (as in ~lallip/)?
- How do I set Unix permissions for some files and directories?