Method: Fargo::Supports::RemoteFileList#file_list!

Defined in:
lib/fargo/supports/remote_file_list.rb

#file_list!(nick, timeout = 10) ⇒ Object

Wait for the results to arrive, timed out after some time



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/fargo/supports/remote_file_list.rb', line 50

def file_list! nick, timeout = 10
  if @file_list.has_key?(nick)
    return parse_file_list(@file_list[nick], nick)
  end

  list = nil
  list_gotten = lambda{ |type, map|
    if type == :file_list && map[:nick] == nick
      list = map[:list]
      true
    else
      false
    end
  }

  timeout_response(timeout, list_gotten){ file_list nick }

  parse_file_list list, nick
end