|
[jruby-user] Dir.mkdir and File.exists: msg#00150lang.jruby.user
p File.exists?('~/Documents/fake/nonexistant/directories/new_dir') #=>false p Dir.mkdir('~/Documents/fake/nonexistant/directories/new_dir') #=>0 p File.exists?('~/Documents/fake/nonexistant/directories/new_dir') #=>true p Dir.mkdir('~/Documents/fake/nonexistant/directories/new_dir') #=>:[-1,-1]:[0,0]: File exists - ~/Documents/fake/nonexistant/directories/new_dir (Errno::EEXIST) p File.exists?('~/Documents/fake/nonexistant/directories/new_dir') #=>true If I am not mistaken, then 1st and 4th expressions are correct, the 2nd should raise an exception because the new_dir is in a directory which doesn't exist, and the 3rd and 5th should return false -Daniel Brumbaugh Keeney --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jruby-user] Re: [jruby-dev] Welcome new committer: MenTaLguY: 00150, Fabio Kung |
|---|---|
| Next by Date: | Re: [jruby-user] Re: [jruby-dev] Welcome new committer: MenTaLguY: 00150, Alexandru Popescu ☀ |
| Previous by Thread: | [jruby-user] Re: [jruby-dev] Welcome new committer: MenTaLguYi: 00150, Fabio Kung |
| Next by Thread: | [jruby-user] Creating Java arrays: 00150, Scott Davies |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |