public read(maximum as Int = 256) as DirectoryBatch throws IOException
Reads up to maximum directory entries (1..4096).
End-of-stream (batch.exhausted == true) is sticky across subsequent reads.
| Parameter | Description |
|---|---|
maximum | Maximum number of directory entries to inspect in this batch (1..4096). |
Bounded batch of subdirectory names, optional file names and aggregate counts.
import klyn.io
try reader = Path.cwd.openReader():
batch = reader.read(256)
print(batch.folders.size)