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:

pathname.cr

Constructors

Class Method Summary

Constructor Detail

def self.new(path : Pathname) #

[View source]

Class Method Detail

def self.cd(path : Pathname) #

[View source]
def self.cd(path : Pathname, &) #

[View source]
def self.entries(path : Pathname) #

[View source]
def self.exists?(path : Pathname) #

[View source]
def self.foreach(path : Pathname, &) #

[View source]
def self.mkdir(path : Pathname, mode = 511) #

[View source]
def self.mkdir_p(path : Pathname, mode = 511) #

[View source]
def self.open(path : Pathname) #

[View source]
def self.open(path : Pathname, &) #

[View source]
def self.rmdir(path : Pathname) #

[View source]