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

Undraw File Manager Re Ms29

About

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

List

Prefix can be:

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

Unix

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.

Windows

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.





Discover More
Undraw File Manager Re Ms29
File System - Path

in a file system. A file is identified by its path through the file system. A file path is a hierarchical URI where: scheme is the scheme that represents the file system such as: file (default)...
Undraw File Manager Re Ms29
What is a relative path ?

A relative path is a path that does not start with a root (prefix) It is relative to another path that is unknown. You need to transform it as absolute|absolute path before accessing any file. Below...
Undraw File Manager Re Ms29
What is an absolute path ?

A path is absolute when it starts with a root (prefix). It contains all the information needed to locate the file. Inside a file system, the absolute path is the file identifier. Absolute path: This...



Share this page:
Follow us:
Task Runner