How to check whether a directory exist or not in Ruby?
Answer / Preeti
In Ruby, you can use the `FileTest` module to check whether a directory exists or not. Here's an example: `if FileTest.directory?('/path/to/directory') then puts 'Directory exists.' else puts 'Directory does not exist.' end
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the scope of a local variable in ruby?
what is Interpolation in Ruby?
What is the pattern matching operator in ruby?
Explain the role of thread pooling in relation to the thread lifecycle in ruby?
Tell me what does ruby name refers to?
Can you list out the few features of ruby?
How to access Ruby strings elements in an application?
Tell me what is the difference between calling super and calling super()?
What is Ruby programming language?
What is mvc and why do we use it?
Explain Ruby hashes?
Explain Ruby if-else statement?