Ruby Check If Path Is A Directory

[Solved] Ruby Check If Path Is A Directory | Ruby - Code Explorer | yomemimo.com
Question : ruby check if path is a directory

Answered by : don-isaac

# Check if filesystem node at path "name" is a directory
File.directory?("name")
# Check if it's a file
File.file?("name")

Source : https://stackoverflow.com/a/10115630/6353900 | Last Update : Tue, 29 Jun 21

Answers related to ruby check if path is a directory

Code Explorer Popular Question For Ruby