M16) Identifying parts of a file path
A program saves a report at the file path shown in Listing 1. Each / separates names. The first / is the root directory, the top-level folder where this path begins.
Use the definitions in Table 1 to identify the parts of the report’s path.
| Part | What to identify |
|---|---|
| Parent directory | The folder immediately containing the file, written as its complete path. |
| File name | The name after the last /, including its extension. |
| Stem | The file name with only its final suffix removed. |
| Final suffix (file extension) | The last dot and everything after it. |
Which choice correctly identifies all four parts?
- Parent
/course/reports; file nameorders.summary.csv.
Stemorders; suffix.summary.csv. - Parent
/course; file namereports/orders.summary.csv.
Stemorders.summary; suffix.csv. - Parent
/course/reports; file nameorders.summary.csv.
Stemorders.summary; suffix.csv. - Parent
/course/reports; file nameorders.summary.
Stemorders.summary.csv; suffixcsv.
TipHint
- Directory separators and dots have different roles:
/separates path components, while a filename may contain several dots. - For example,
result.final.txthas the stemresult.finaland the final suffix.txt. Removing the final suffix leaves earlier dots in the stem.