Directory Structure

Directories are hierarchical - that is, they are organized in a structure resembling a tree, with a single root which branches off into related groups of content.


The top-most directory is considered the root directory. Whatever current “folder” you are in can be considered the active directory, and any directories inside that current directory are called subdirectories.

Directory Tree
└──  directory/ current
    └──  subdirectory/
        └──  file.txt

Note The root directory in our trees will be shorted to . from here-on-out.


The web also use familial terms to describe content relationships, such as “grandparent,” “parent,” and “child.” Let’s see how this applies to directories:


Directory Tree
└──  my-site/ parent to
└── content/ child of
└── images/ └── logo.png

In this example, content/ is a subdirectory of the my-site/ directory, also referred to as a “child” of that directory (i.e. child directory).

The reverse also applies; in reference to content/, my-site/ would be considered its parent directory.

This can also describe the location of files. The file logo.png is found in its parent directory, images/.

Directory Tree
└──  my-site/
    └──  content/
        └──  images/ parent directory
└── logo.png


This familial titling can go deeper as well.

Directory Tree
└──  my-site/ grandparent to
└── content/ └── images/ grandchild of
└── logo.png

Here, images/ is the grandchild directory of my-site/, which is images/’s grandparent directory.

This process can extend to great-grandmember, great-great-grandmember, and so forth.

development directory file folder name