Method: Moab::StorageObject#size

Defined in:
lib/moab/storage_object.rb

#sizeInteger

Returns the size occupied on disk by the storage object, in bytes. this is the entire moab (all versions).

Returns:

  • (Integer)

    the size occupied on disk by the storage object, in bytes. this is the entire moab (all versions).



228
229
230
231
232
233
234
# File 'lib/moab/storage_object.rb', line 228

def size
  size = 0
  Find.find(object_pathname) do |path|
    size += FileTest.size(path) unless FileTest.directory?(path)
  end
  size
end