Hi,
I am confused with the below Dir class methods:
Dir::exist?
Dir::::exists?
Can anyone help me here to understand the difference between them with
an simple example?
Thanks
Hi,
I am confused with the below Dir class methods:
Dir::exist?
Dir::::exists?
Can anyone help me here to understand the difference between them with
an simple example?
Thanks
“Dir::::exists?” doesn’t exist.
exists? and exist? are aliases, I think.
Personally I use File.directory?
On Wed, Jan 30, 2013 at 2:58 PM, Arup R. [email protected]
wrote:
Hi,
I am confused with the below Dir class methods:
Dir::exist?
Dir::::exists?
That is a syntax error. I guess you mean Dir::exists?.
Can anyone help me here to understand the difference between them with
an simple example?
Why do you assume there is a difference? Did you read the
documentation? Hint:
$ diff -U5 <(ri -T Dir::exist?) <(ri -T Dir::exists?)
— /dev/fd/63 2013-01-30 15:30:24.000000000 +0100
+++ /dev/fd/62 2013-01-30 15:30:24.000000000 +0100
@@ -1,6 +1,6 @@
-= Dir::exist?
+= Dir::exists?
File.directory?(file_name) → true or false
Kind regards
robert
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs