class Dir
Overview
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
.
Included Modules
- Enumerable(String)
- Iterable(String)
Defined in:
ext/dir.crClass Method Summary
-
.each_child_entry(dirname : Path | String, & : Crystal::System::Dir::Entry -> )
Yield every child entry in the directory.
Instance Method Summary
-
#each_child_entry(& : Crystal::System::Dir::Entry -> ) : Nil
Yield every child entry in the directory.
Class Method Detail
def self.each_child_entry(dirname : Path | String, & : Crystal::System::Dir::Entry -> )
#
Yield every child entry in the directory.
Instance Method Detail
def each_child_entry(& : Crystal::System::Dir::Entry -> ) : Nil
#
Yield every child entry in the directory.