- Once we have seen how to view a two-level directory as a two-level tree, the natural generalization is to extend the directory structure to a tree of arbitrary height ( see Fig. 13).
Figure 13:
Tree-structured directory structure.
|
- This generalization allows users to create their own subdirectories and to organize their files accordingly.
- A tree is the most common directory structure. The tree has a root directory, and every file in the system has a unique path name.
- A directory is simply another file, but it is treated in a special way. All directories have the same internal format.
- One bit in each directory entry defines the entry
- as a file (0),
- as a subdirectory (1).
- Path names can be of two types: absolute and relative
- An absolute path name begins at the root and follows a path down to the specified file, giving the directory names on the path.
- A relative path name defines a path from the current directory.
- With a tree-structured directory system, users can be allowed to access, in addition to their files, the files of other users.
- For example, user can access a file of user by specifying its path names.
- User can specify either an absolute or a relative path name.
- Alternatively, user can change her current directory to be user 's directory and access the file by its file names.
Cem Ozdogan
2010-05-05