Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

Example Paths

Examples below use the following paths:

Windows Posix
C:\Foo\Bar\ /foo/bar/

Path Decomposition

Part Name Windows Posix
Full Path C:\Foo\Bar\ /foo/bar/
Root Name C: <empty>
Root Directory \ /
Root Path C:\ /
Directory Name C:\Foo\Bar\ /foo/bar/
Base Directory* C:\Foo\ /foo/
Base Name / File Name
(File) Stem / File Root Baz baz
(File) Extension .xyz .xyz

* top of the current working tree; typically used as reference for a relative path (see below)

Path Qualification

Name Windows Posix
Absolute Name C:\Foo\Bar\ /foo/bar/
Relative Name Bar\* bar/**

* (relative to C:\Foo\)

** (relative to /foo/)

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