Method: Rails::Paths::Path#existent

Defined in:
railties/lib/rails/paths.rb

#existentObject

Returns all expanded paths but only if they exist in the filesystem.



220
221
222
223
224
225
226
227
228
229
# File 'railties/lib/rails/paths.rb', line 220

def existent
  expanded.select do |f|
    does_exist = File.exist?(f)

    if !does_exist && File.symlink?(f)
      raise "File #{f.inspect} is a symlink that does not point to a valid file"
    end
    does_exist
  end
end