Class: File

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

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
# File 'lib/carrierwave/core_ext/file.rb', line 6

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

#sizeObject



2
3
4
# File 'lib/carrierwave/core_ext/file.rb', line 2

def size
  File.size(path)
end