Method: Mechanize::FileResponse#content_length

Defined in:
lib/mechanize/file_response.rb

#content_lengthObject



31
32
33
34
# File 'lib/mechanize/file_response.rb', line 31

def content_length
  return dir_body.length if directory?
  File.exist?(@file_path) ? File.stat(@file_path).size : 0
end