Method: Rack::Adapter::Rails#file_exist?

Defined in:
lib/rack/adapter/rails.rb

#file_exist?(path) ⇒ Boolean

TODO refactor this in File#can_serve?(path) ??

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/rack/adapter/rails.rb', line 44

def file_exist?(path)
  full_path = ::File.join(@file_server.root, Utils.unescape(path))
  ::File.file?(full_path) && ::File.readable_real?(full_path)
end