A directory that can be iterated. It is NOT legal to initialize this with a regular Dir that has been opened without iteration permission.

Fields

dir: Dir,

Types

Functions

fn chmod(self: IterableDir, new_mode: File.Mode) ChmodError!void

Changes the mode of the directory. The process must have the correct privileges…

Changes the mode of the directory. The process must have the correct privileges in order to do this successfully, or must have the effective user ID matching the owner of the directory.

fn chown(self: IterableDir, owner: ?File.Uid, group: ?File.Gid) ChownError!void

Changes the owner and group of the directory. The process must have the correct…

Changes the owner and group of the directory. The process must have the correct privileges in order to do this successfully. The group may be changed by the owner of the directory to any group of which the owner is a member. If the owner or group is specified as null, the ID is not changed.

fn close(self: *IterableDir) void

No documentation provided.

fn iterate(self: IterableDir) Iterator

No documentation provided.

fn iterateAssumeFirstIteration(self: IterableDir) Iterator

Like iterate, but will not reset the directory cursor before the first iterat…

Like iterate, but will not reset the directory cursor before the first iteration. This should only be used in cases where it is known that the IterableDir has not had its cursor modified yet (e.g. it was just opened).

fn walk(self: IterableDir, allocator: Allocator) !Walker

Recursively iterates over a directory. Must call Walker.deinit when done. Th…

Recursively iterates over a directory. Must call Walker.deinit when done. The order of returned file system entries is undefined. self will not be closed after walking it.

Values