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
- DirRepositoryDiscovery
- Enumerable(String)
- Iterable(String)
Defined in:
class_extensions.crClass Method Summary
Instance Method Summary
- #each_subdir(&)
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
Instance methods inherited from module DirRepositoryDiscovery
is_git_repo? : Bool
is_git_repo?,
is_svn_repo? : Bool
is_svn_repo?
Class Method Detail
Instance Method Detail
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>