[IO]FolderA directory on the local filesystem, listed entry by entry.
open: starts the listing; each next answers one entry as an [IO]File (nil when exhausted), and reset starts over. The class side manages directories themselves: create: (like mkdir -p) and delete: (empty directories only).
var d = [IO]Folder.open:'/tmp' var entry = d.next "* an [IO]File, or nil once exhausted
Iteration for directory listings: mixing in Iterate gives a Folder the whole collection protocol (collect:, select:, count, …) over its entries.
Create the directory and any missing parents — idempotent, like mkdir -p: an existing directory is not an error. Returns nil.
Remove an *empty* directory (a non-empty one throws an IoError). Refusing to recurse is deliberate: a one-selector recursive delete is too easy to call by accident. Returns nil.
Open a directory for listing. A missing or unreadable directory throws a catchable IoError.
Whether the argument is an [IO]Folder with the same path string (no canonicalization — /tmp and /tmp/ differ). A non-Folder argument is simply unequal.
Call b with each entry — [IO]File objects; is_file? tells files from subfolders — then rewind so the folder can be iterated again. Satisfies the each:-based Iterate protocol by driving the native next/reset cursor.
The next directory entry as an [IO]File (its full path plus metadata), or nil once the listing is exhausted. Order is whatever the OS yields — not sorted; . and .. are not included.
The directory's path, as the String it was opened with.
Restart the listing from the beginning: the next next re-reads the directory (picking up any changes since). Returns nil.