Files, Directories, and Other Directory Entries
A directory can contain ordinary files, other directories, links, and other entry types supported by the platform.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace an entry filter
An import taking only regular CSV files should reject a folder ending in .csv even if the suffix meets the name rule. File extensions and signatures explain why names alone cannot establish the expected input.
State traversal behavior
Decide whether to descend into nested directories and follow linked entries. Repeatedly following links can revisit the same underlying locations. Visited sets describe a model for tracking already visited identities.[1]
Inspect an entry's type before applying file operations
A report tree can contain a regular file, a subdirectory and a symbolic link. Opening each name as though it were an ordinary readable data file can fail or read another item. Define whether links are followed and whether directories are traversed. See stable order for processing files.
names: day1.txt, archive/, latest.txt
day1.txt → regular file
archive/ → nested directory
latest.txt → link requiring explicit policy
Test traversal rules on representative entries
Following directory links can introduce cycles into a recursive walk. A link can also point to a missing object. Record the entry type and result separately, and exercise a dangling link where the platform supports it.