Skip to content

Instantly share code, notes, and snippets.

@vertiginous
Created December 29, 2010 23:27
Show Gist options
  • Select an option

  • Save vertiginous/759212 to your computer and use it in GitHub Desktop.

Select an option

Save vertiginous/759212 to your computer and use it in GitHub Desktop.
irb(main):006:0> FileUtils.mkdir("C:/foo")
Errno::ENOENT: No such file or directory - No such file or directory - C:/foo
from ./lib/fakefs/fileutils.rb:13:in `mkdir'
from (irb):6
irb(main):007:0> FileUtils.mkdir_p("C:/foo")
=> (FakeDir name:"foo" parent:"C:" size:0)
irb(main):008:0> FileUtils.touch("C:/foo/bar")
=> ["C:/foo/bar"]
irb(main):009:0> File.exists?("C:/foo/bar")
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment