std1.0.0-beta-7 SafeC docs

std :: dir

Struct std::Dir

#include <std/dir.h> source

struct Dir { }

An open directory listing.

Methods

§static ?&Dir open(const &char path)source · definition

Opens 'path' for listing; null if it isn't a readable directory.

§int next(&DirEntry out)source · definition

Reads the next entry into 'out' (its name is replaced). "." and ".." are skipped. Order is whatever the OS returns. 1 if an entry was read, 0 at the end of the listing.

§void drop()source · definition

Closes the listing (the handle is invalid afterwards).

§void close() consumesource · definition

= drop()