Prev: Issue during multiple calls to C embedded Ruby with dlopen
Next: Ruby equivalent for php openssl_pkey_get_public
From: Luis Lavena on 9 Feb 2010 08:36 On Feb 8, 10:11 pm, Greg Willits <li...(a)gregwillits.ws> wrote: > So, I was surprised to find out that Dir.mkdir will not create all > folders in a path when more than just the last level does not exist. > Example: Dir.mkdir('/f1/f2/f3') will not create /f3 when /f2 does not > exist. I expected it to make both /f2 and /f3 to get the job done. I > expected it because the language I used most previously did do that. > > After some googling I'm not finding any elegant solutions. > require 'fileutils' FileUtils.mkdir_p 'my/path/to/something' -- Luis Lavena |