Skip to content

Instantly share code, notes, and snippets.

@acidtone
Last active September 7, 2023 14:32
Show Gist options
  • Save acidtone/2062459ab8b9ee758ca1b5ab312f2440 to your computer and use it in GitHub Desktop.
Save acidtone/2062459ab8b9ee758ca1b5ab312f2440 to your computer and use it in GitHub Desktop.
File, directory and naming terminology

Terminology: Files, directories and paths

Directory : Equivalent to a folder on a file system. "Directory" sounds more nerdy.

Root Directory : The top folder of any given server "context". On your local file system, the root directory is the top directory on your hard drive. For a website, it's the top directory under a domain name.

Present Working Directory : Your current location in the file system.

Relative File Path : A partial path (there is no leading slash) that is relative to the working directory. Example: images/pic1.png

Absolute File Path : A full path (starts with a leading slash) that points to the same location in a file system regardless of the current working directory. The leading slash make the path relative to the root directory. Example: /images/pic1.png


Warning: Absolute and relative paths have a slightly different definition in the context of HTML links. Absolute paths are full URLs with protocol and domain information. Relative paths are all others, including links that start with a leading slash. {: .notice--warning}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment