Leaf

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.

Technically, a leaf node in a tree structure is defined as a node that does not have child nodes. Files fit this definition, though some files are “containers” that store multiple files.
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.

Updated December 9, 2024 by Per C.

APA
MLA
Chicago
HTML
Link

https://techterms.com/definition/leaf

Copy