What is a file system root or drive ? (known as prefix)


The prefix is a path concept that is used to handle:

  • root directories on UNIX platforms,
  • drive specifiers, root directories, and UNC pathnames on Microsoft Windows platforms


Prefix can be:

A disk-drive specifier C:\
A UNIX root directory “/”
A Microsoft Windows UNC pathname \\\\


For UNIX platforms:

  • the prefix of an absolute pathname is always /.
  • Relative pathnames have no prefix.
  • The abstract pathname denoting the root directory has the prefix “/” and an empty name sequence.


For Microsoft Windows platforms:

  • the prefix of a pathname that contains a drive specifier consists of the drive letter followed by “:” and possibly followed by “\\” if the pathname is absolute.
  • the prefix of a UNC pathname (network shares) is “\\\\”; the hostname and the share name are the first two names in the name sequence.
  • A relative pathname that does not specify a drive has no prefix.

Powered by ComboStrap