Leaf
A "leaf" in computing refers to a file within a hierarchical directory structure. Files are akin to leaves on a tree. Just as a tree's branches extend outwards, dividing into smaller branches, a file system organizes its data in a similar fashion.
In the tree structure:
- The lowest-level directory (also called the root directory) is the trunk of the tree.
- Folders (or directories) act as the branches, branching into subdirectories.
- Files are the leaves, which serve as the endpoints of each branch. A branch (folder) can have multiple leaves.
Tree structure vs root structure
The directory structure of a storage device may also be pictured as a tree's root system, where the root folder is the top-level directory. In this model, the tree structure is flipped upside down with the root directory on top and files and folders below it.