Bifalgorithm post · Computer science one · Paths
What is the difference between absolute and relative file paths?
What is the difference between absolute and relative file paths? (Computer science one · Paths) — "When specifying a path we can either specify an absolute pat…
Ideas in this flowchart
- File paths can be specified as absolute paths or relative paths.
- An absolute path specifies every subdirectory from the root to the file.
- A relative path is specified in relation to the current working directory.
- The root directory is the top-most directory in the file system.
- Each subdirectory in a path is separated by a directory delimiter.
- Windows uses backslashes as delimiters and specifies the root with a volume name such as C:\.
- A Windows absolute path may be C:\applications\users\data\data.txt.
- Unix-based systems use forward slashes as delimiters, with a single forward slash representing the root.
- The equivalent Unix-based absolute path may be /applications/users/data/data.txt.
- In most Windows and Unix-based systems, the current directory is denoted using a single period.