public DirectoryReader( folder as FolderPath, includeFileNames as Boolean = true, includeFileBytes as Boolean = false, followSymlinks as Boolean = false ) throws IOException
Opens a streaming cursor on a directory.
| Parameter | Description |
|---|---|
folder | Directory to enumerate. |
includeFileNames | Retain regular file names in DirectoryBatch.fileNames. |
includeFileBytes | Accumulate logical file sizes in DirectoryBatch.bytes. |
followSymlinks | Follow symbolic links instead of counting them as skipped. |
import klyn.io
try reader = DirectoryReader(Path.cwd):
batch = reader.read(128)
print(batch.files)