Skip to content

Instantly share code, notes, and snippets.

@maxtruxa
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxtruxa/8b1a905a40b646afa4ca to your computer and use it in GitHub Desktop.
Save maxtruxa/8b1a905a40b646afa4ca to your computer and use it in GitHub Desktop.

Example Paths

Examples below use the following paths:

Windows Posix
C:\Foo\Bar\Baz.xyz /foo/bar/baz.xyz

Path Decomposition

Part Name Windows Posix
Full Path C:\Foo\Bar\Baz.xyz /foo/bar/baz.xyz
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 Baz.xyz baz.xyz
(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\Baz.xyz /foo/bar/baz.xyz
Relative Name Bar\Baz.xyz* bar/baz.xyz**

* (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