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

Defined in:

class_extensions.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module DirRepositoryDiscovery

is_git_repo? : Bool is_git_repo?, is_svn_repo? : Bool is_svn_repo?

Class Method Detail

def self.create_if_not_exists(path) #

[View source]

Instance Method Detail

def each_subdir(&) #

[View source]
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>

[View source]