Welcome guest


File System Hierarchy

Order is very important to a computer and just as we need maps and roads to lead us to a destination a computer needs the same things.  By storing things in a hierarchal manner, the computer can know how to search for things and how to store them more efficiently.  For a particular file system there is a starting point.  From that starting point we can find files and/or directories (folders).  Within each directory we can find more files and/or directories.  This keeps going and going until we can see everything on the device.  If you were to draw this out you would see what resembles an upside-down tree.  Many times this drawn out picture of a file system is known as a file tree.  Before you can fully appreciate a file tree in regards to a file system, you should understand some common descriptions used when talking about a computer tree.

Trees, as created by Mother Nature, have a root at the bottom that goes into the ground and then that root works its way up the tree and spreads to branches, leaves, etc. In the computer world however, trees work or "grow" in the opposite direction. In the example below, the node (green circle) labeled "A" is the root of the tree.

File Tree

Fig. 1: An example computer "tree".

Each node has zero or more child nodes below them. B, C, and D are child nodes of A. A parent node is one that has one or more child nodes. A is the parent node of B, C, and D. Leaf nodes are nodes which have no children. C is a leaf node. By using the terms parent, child, and leaf we can describe any position in the tree.

Below is an illustration of a mock file system to help you further visualize hierarchy. In this example, we use the natural hierarchy of the universe, and its various heavenly bodies, to form the file tree that models this file system. (Files are ovals and directories are rectangles)

 

Example of Heirarchy Using the Universe

Fig. 2: Universe hierarchy structure

 

While all operating systems use hierarchy to organize file and directories, some OS's take differing approaches. Typically a file system is characterized as belonging to one physical storage device, such as a hard drive or USB key drive. With Linux and Mac OS X, a virtual file system is created that encompasses all file storage devices that make up the computer system. This system uses one file tree to reference every device and the starting point of the tree is identified as the root, usually defined by a single slash (/). On Windows XP however, each storage device (or partition of a device) is treated as having its own file system. This is usually represented by a drive letter, followed by a colon. You are already familiar with this as C: typically defines your primary storage device, such as the hard drive inside your computer.