Concept
How do file names, extensions, and working directories affect file paths?
"When opening a file on a file system, it is necessary to specify which file you want to open. This is typically done by specifying at least the name of the file. Often files will have “extensions” which indicate the type of file it is such as .txt for text files or .html for HTML files. However, file extensions are only for organizational purposes and have no real bearing on what data is stored in the file. More important is the path of the file. Usually, if no path is specified, then implicitly we are opening the file in the Current Working Directory (CWD). For example, if we open the file data.txt then we are opening the file in the same directory in which our program is executing."
Related Ideas
- How can you refer to directories and files at different levels of a directory tree?ComputerScienceOne · Error Handling
- What is 22?ComputerScienceOne · Opening Files
- How do you open and validate files in PHP?ComputerScienceOne · Opening Files
- How is the Linux file system organized?ComputerScienceOne · Error Handling
- What types of errors can occur when processing files?ComputerScienceOne · Error Handling
- How can a Scanner read input from a file?ComputerScienceOne · File Input
- How can PHP use URLs as file names?ComputerScienceOne · Closing Files