# File rice/url.rb, line 112 def fetchFTP # Split path into '/', directory-path, '/', file @path =~ /\(.*)\(.*)$/ dir, file = $1, $2 data = nil # (Port ignored) Net::FTP.start(@host, @username, @password) { | ftp | # Read data. We read into /dev/null but at the same time # capture the bytes into a string. data = '' ftp.getbinaryfile(file, '/dev/null') { | bytes | data << bytes } } return data end