Directory Structure — Concept Check
Questions on Directory Structure. Directory structures define how files are organised and named within a filesystem, evolving from flat single-level designs to hierarchical trees with sharing via links.
Questions in this quiz
8 questions on Directory Structure — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer is trying to access a file using a relative path '../docs/file.txt' from '/home/user/projects'. Where is the file located?
- A/home/user/projects/docs/file.txt
- B/home/user/docs/file.txt
- C/home/user/projects/../docs/file.txt
- D/home/user/docs/projects/file.txt
2.A user reports that a file they deleted is still accessible via another path. What directory structure feature explains this?
- ASymbolic links
- BHard links
- CDirectory cycles
- DFile caching
3.In Java, what method would you use to combine '/home/user' with 'docs/file.txt'?
- APaths.get()
- Bnormalize()
- Crelativize()
- Dresolve()
4.A developer uses Files.walk() on a directory but notices some files are missing in the output. What might be the reason?
- AFiles.walk() skips hidden files by default
- BFiles.walk() only lists directories
- CFiles.walk() needs a custom FileVisitor
- DFiles.walk() requires a depth limit
5.A user complains about file naming conflicts in a shared directory. Which directory structure can solve this issue?
- ATree-structured directory
- BSingle-level directory
- CGeneral-graph directory
- DTwo-level directory
6.A developer mistakenly believes that symbolic links create a copy of the file. What is the correct behavior of symbolic links?
- AThey reference the original file without duplication
- BThey are only valid within the same filesystem
- CThey create a copy of the file
- DThey automatically update if the original file moves
7.What is the purpose of the normalize() method in Java's Path API?
- ATo resolve symbolic links
- BTo convert relative paths to absolute
- CTo change file permissions
- DTo remove redundant path elements
8.A user tries to delete a directory but receives an error about non-empty directories. What directory structure feature might cause this?
- ATree-structured directories
- BSingle-level directories
- CGeneral-graph directories
- DAcyclic-graph directories