Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby check if a file exists

# file? will only return true for files
File.file?(filename)
# Will also return true for directories
File.exist?(filename)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ruby #check #file #exists
ADD COMMENT
Topic
Name
2+5 =