Class: File

Inherits:
Object show all
Defined in:
lib/carrierwave.rb,
lib/carrierwave/core_ext/file.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


106
107
108
109
110
# File 'lib/carrierwave.rb', line 106

def empty?
  size == 0
rescue Errno::ENOENT
  false
end

#sizeObject



102
103
104
# File 'lib/carrierwave.rb', line 102

def size
  File.size(path)
end