OS Path Names
A way must be needed to specify the name of the files when the file system is organized as directory tree.
Therefore, the following two methods generally are used just to specify the file names:
- Absolute path name
- Relative path name
Now, let's describe the above two method used to name the file.
Absolute Path Name
Absolute path name consist of the path from the root directory to the file.
As an example, the path
means that the root directory contains a subdirectory usr, which in turn contains a subdirectory codescracker, which contains the file named myfile.
In windows platform, you can specify the above given path name as follows:
Relative Path Name
The relative path name is used in conjuction with the concept of the working directory/current directory.
A user can designate one directory as the current working directory in which case all the path names not beginning at the root directory are taken relative to the working directory.
For example, if /usr/codescracker is the current working directory, then the file whose absolute path is /usr/codescracker/myfile can now be referenced as myfile.
« Previous Tutorial Next Tutorial »
Like/Share Us on Facebook 😋