File System Hierarchy

Order is very important to a computer; 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 store them more efficiently.

For any particular file system, there is a starting point. From the starting point, we can locate files and/or directories (folders). The directories themselves can also contain more directories and files. This system of directories and files is known as a file tree. In nature, trees begin with a root and grow to leaves. In the computing world, this is the same. The root of a file tree is the beginning of the file system, and all other nodes trace back to it. The only difference is that the root starts at the top and grows down from the root in a file system. In the image below, the node labeled “A” is the root of the system.

File tree

Nodes can, but are not required to, have child nodes (a node connected below another node). Nodes that have child nodes are known as parent nodes. Above, nodes B, C and D are all child nodes of A. Therefore, 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.