Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to check whether a directory exist or not in Ruby?



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

Post New Answer

More Ruby Interview Questions

What is the scope of a local variable in ruby?

1 Answers  


what is Interpolation in Ruby?

1 Answers  


What is the pattern matching operator in ruby?

1 Answers  


Explain the role of thread pooling in relation to the thread lifecycle in ruby?

1 Answers  


Tell me what does ruby name refers to?

1 Answers  


Can you list out the few features of ruby?

1 Answers  


How to access Ruby strings elements in an application?

1 Answers  


Tell me what is the difference between calling super and calling super()?

1 Answers  


What is Ruby programming language?

1 Answers  


What is mvc and why do we use it?

1 Answers  


Explain Ruby hashes?

1 Answers  


Explain Ruby if-else statement?

1 Answers  


Categories