instance method
file_readable?
Ruby on Rails 6.1.7.10
Since v6.1.7.10 PrivateSignature
file_readable?(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 139
def file_readable?(path)
file_stat = File.stat(File.join(@root, path.b))
rescue SystemCallError
false
else
file_stat.file? && file_stat.readable?
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 139
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler