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