Ruby Check If A File Exists

[Solved] Ruby Check If A File Exists | Php Frameworks Codeigniter - Code Explorer | yomemimo.com
Question : ruby check if a file exists

Answered by : don-isaac

# file? will only return true for files
File.file?(filename)
# Will also return true for directories
File.exist?(filename)

Source : https://stackoverflow.com/questions/8590098/how-to-check-for-file-existence | Last Update : Sun, 02 May 21

Answers related to ruby check if a file exists

Code Explorer Popular Question For Php Frameworks Codeigniter