lib/sinatra/assetpack/options.rb
# Returns the local file for a given URI path.
# Returns nil if a file is not found.
Returns the local file for a given URI path.
Returns nil if a file is not found.
Returns the local file for a given URI path . Returns nil if a file is not found .
def local_file_for(path)
        path = path.squeeze('/')
        uri, local = served.detect { |uri, local| path[0...uri.size] == uri }
        if local
          path = path[uri.size..-1]
          path = File.join app.root, local, path
          path  if File.exists?(path)
        end
      end
def local_file_for ( path ) path = path . squeeze ( '/' ) uri , local = served . detect { | uri , local | path [ 0 ... uri . size ] == uri } if local path = path [ uri . size .. - 1 ] path = File . join app . root , local , path path if File . exists? ( path ) end end
Returns the local file for a given URI path.
Returns the local file for a given URI path .
path