lib/fig/protocol/file.rb
# Determine whether we need to update something.  Returns nil to indicate
# "don't know".
Determine whether we need to update something.  Returns nil to indicate
"don't know".
Determine whether we need to update something . Returns nil to indicate " don ' t know " .
def path_up_to_date?(uri, path, prompt_for_login)
    begin
      unescaped_path = CGI.unescape uri.path
      if ::File.size(unescaped_path) != ::File.size(path)
        return false
      end
      if ::File.mtime(unescaped_path) <= ::File.mtime(path)
        return true
      end
      return false
    rescue Errno::ENOENT => error
      raise Fig::FileNotFoundError.new error.message, uri
    end
  end
def path_up_to_date? ( uri , path , prompt_for_login ) begin unescaped_path = CGI . unescape uri . path if :: File . size ( unescaped_path ) != :: File . size ( path ) return false end if :: File . mtime ( unescaped_path ) <= :: File . mtime ( path ) return true end return false rescue Errno :: ENOENT => error raise Fig :: FileNotFoundError . new error . message , uri end end
Determine whether we need to update something.
Determine whether we need to update something .
uri
path
prompt_for_login