class

Dir

Inherits Iterable < Enumerable < Reference < Object

Objects of class Dir are directory streams representing directories in the underlying file system. They provide a variety of ways to list directories and their contents.

The directory used in these examples contains the two regular files (config.h and main.rb), the parent directory (..), and the directory itself (.).

See also: File.

Class methods

mktmpdir

Block form: use the functional helper to guarantee cleanup

Source
mktmpdir

Non-block form remains compatible and returns a Crtemp instance

Source
mktmpdir_result

Functional non-block form that returns Result-wrapped Crtemp instance

Source