class Dir
- Dir
- Reference
- Object
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:
pathname.crConstructors
Class Method Summary
- .cd(path : Pathname)
- .cd(path : Pathname, &)
- .entries(path : Pathname)
- .exists?(path : Pathname)
- .foreach(path : Pathname, &)
- .mkdir(path : Pathname, mode = 511)
- .mkdir_p(path : Pathname, mode = 511)
- .open(path : Pathname)
- .open(path : Pathname, &)
- .rmdir(path : Pathname)