Path
A path is the unique location of a document in a file system.
Paths are used in information technology to point to locations in hierarchical (operating) systems such as on computers or the Internet. The structure of a URL, for example, describes a path. The path components are separated by delimiters such as a slash ( "/") or backslash ( "\"). Depending on the system, other delimiters can be used. Paths can be absolute (complete) or relative. The difference between absolute and relative paths plays an important role in the linking of documents or webpages on a website.
Absolute path
An absolute path is unique to one specific location in a file system, regardless of the working directory.
In the Windows operating system, a path looks like the following example:
C:\user\folder1\sample.jpg
C is the drive containing the data storage. From there, the path describes every step you need to find the desired file.
For websites, an absolute path would look like this, for example:
http://de.ryte.com/wiki/path
The domain is structured based on the Domain Name System. If you now wish to link to this page, you could do this as follows using an anchor tag:
<a href="http://de.ryte.com/wiki/path">path</a>
Relative path
A relative path is relative to the current working directory of the user or application. The full path does not need to be specified to operate within this working directory. Relative paths are particularly relevant if you want to link from one of your webpages to another one of your webpages internally. There are simple rules for creating page internal links.
- If linking to pages that are listed in the same URL as the current page, the path can be completely omitted:
OtherArticle
- For links to subdirectories only the subdirectory and the target document therein gets specified:
Subcategory/OtherArticle
- To link to a different directory, you place two periods and a slash in front of the higher-level directory. Next, you specify the directory you are switching to and the file being linked to:
../Wiki2/Article