Last Updated on September 10, 2021 by Oluwatuyi
Absolute Path is the location of a directory or file in a computer. It contains the root directory as well as all other sub directories that contain the file or directory. Paths are used extensively in operating systems to represent file and directory relationships. They are also necessary to the operation of the internet and form the basis of URLs.
It is also used extensively in operating systems to represent file and directory relationships. They are also necessary to the operation of the internet and form the basis of URLs.
Absolute paths use a root directory that is usually at the top of the file tree. This means that no matter what directory you are currently in you can always use this path to locate a resource on the system.
Examples, in Linux and Unix based operating systems and web servers the absolute path usually starts with a forward slash /. Each directory is then separated by forward slashes.
In Microsoft Windows based operating systems and web servers it usually starts with a drive letter and is separated by backslashes.
URLs follow the Unix convention of using forwards slashes to separate files and directories on servers.