Module: Elixir::File

Defined in:
lib/elixir/file.rb

Class Method Summary collapse

Class Method Details

.cd(path) ⇒ Object



5
6
7
8
9
# File 'lib/elixir/file.rb', line 5

def cd path
  :ok if Dir.chdir(path).zero?
rescue Errno::ENOENT
  [:error, :enoent]
end

.cd!(path) ⇒ Object



11
12
13
# File 'lib/elixir/file.rb', line 11

def cd! path
  :ok if Dir.chdir(path).zero?
end