Determine size of a file
Returns:
Returns size if exists. Returns -1 if path does not exist
15 16 17 18 19 20 21
# File 'lib/aruba/platforms/determine_file_size.rb', line 15 def call(path) return -1 unless File.file? path FileSize.new( File.size(path) ) end