DirectoryBatch
classin packageklyn.io
public class DirectoryBatch
DirectoryBatch

Bounded directory-enumeration batch produced by DirectoryReader.read(...).

Subdirectory names are collected in folders, and regular file names are collected in fileNames when includeFileNames is enabled on the reader. Aggregate regular file counts, logical byte totals (when includeFileBytes is enabled or provided by OS enumeration) and skipped entries (symbolic links when not followed, Windows reparse points, special files or vanished entries) are reported alongside the exhausted end-of-stream indicator.

import klyn.io

try reader = Path.cwd.openReader():
    batch = reader.read(256)
    print(batch.folders.size)
    print(batch.fileNames.size)
Fields
Modifier and Type Member Description
public bytes
bytes as ULong = 0ul
Sum of logical file sizes in bytes for regular files in this batch when includeFileBytes is enabled (or provided directly by OS enumeration).
public exhausted
exhausted as Boolean = false
true when the directory stream has reached its end.
public fileNames
fileNames as ArrayList<String> = []
Direct regular file names discovered in this batch when includeFileNames is enabled on the owning DirectoryReader.
public files
files as ULong = 0ul
Number of regular file entries counted in this batch.
public folders
folders as ArrayList<String> = []
Direct subdirectory names discovered in this batch.
public skipped
skipped as ULong = 0ul
Number of excluded symbolic links, Windows reparse points, device nodes, special files or vanished entries in this batch.