Concept
What is the difference between absolute and relative file paths?
"When specifying a path we can either specify an absolute path or a relative path. An absolute path specifies each and every subdirectory in the file system from the root to the directory that the file is located in. The root directory is the top-most directory in the file system. Each subdirectory is separated by some delimiter. Windows systems use a backslash as a directory delimiter while the root directory is specified using a “volume” name such as C:\\. For example, an absolute path on a Windows system may look something like: C:\\applications\\users\\data\\data.txt On a Unix-based system, a forward slash is used as a directory delimiter and the root directory is simply a single forward slash. The same directory structure in a Unix-based system would look like the following. /applications/users/data/data.txt A path may also be relative to the current working directory. In most systems (Windows and Unix-based) the current directory is denoted using a single period, .."
Related Ideas
- How can you refer to directories and files at different levels of a directory tree?ComputerScienceOne · Error Handling
- How do you open and validate files in PHP?ComputerScienceOne · Opening Files
- What is 22?ComputerScienceOne · Opening Files
- How is the Linux file system organized?ComputerScienceOne · Error Handling
- How can a Scanner read input from a file?ComputerScienceOne · File Input
- How are files read, written, and properly managed?ComputerScienceOne · Paths
- What types of errors can occur when processing files?ComputerScienceOne · Error Handling
- How can PHP use URLs as file names?ComputerScienceOne · Closing Files