SyntaxFix
Write A Post
Hire A Developer
Questions
Tags
Is there a Ruby class/method where I could pass "a full path", home/me/a_file.txt, to identify whether it is a valid file path?
home/me/a_file.txt
This question is related to ruby file
ruby
file
# file? will only return true for files File.file?(filename)
and
# Will also return true for directories - watch out! File.exist?(filename)
Source: Stackoverflow.com