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:

  1. The lowest-level directory (also called the root directory) is the trunk of the tree.
  2. Folders (or directories) act as the branches, branching into subdirectories.
  3. 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.

quizTest Your Knowledge

Which occupation focuses most closely on SERPs?

A
CAD designer
0%
B
SEO specialist
0%
C
Audio producer
0%
D
Digital photographer
0%
Correct! Incorrect!     View the SERP definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Leaf on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.