Class: Cloudscopes::StatFs::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/cloudscopes/filesystem.rb

Overview

The result of a statfs operation, see “man statfs” for more information on each field. We add some helper methods that deal in bytes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bavailObject

Returns the value of attribute bavail

Returns:

  • (Object)

    the current value of bavail



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def bavail
  @bavail
end

#bfreeObject

Returns the value of attribute bfree

Returns:

  • (Object)

    the current value of bfree



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def bfree
  @bfree
end

#blocksObject

Returns the value of attribute blocks

Returns:

  • (Object)

    the current value of blocks



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def blocks
  @blocks
end

#bsizeObject

Returns the value of attribute bsize

Returns:

  • (Object)

    the current value of bsize



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def bsize
  @bsize
end

#ffreeObject

Returns the value of attribute ffree

Returns:

  • (Object)

    the current value of ffree



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def ffree
  @ffree
end

#filesObject

Returns the value of attribute files

Returns:

  • (Object)

    the current value of files



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def files
  @files
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



6
7
8
# File 'lib/cloudscopes/filesystem.rb', line 6

def type
  @type
end

Instance Method Details

#availObject



9
# File 'lib/cloudscopes/filesystem.rb', line 9

def avail; bavail * bsize; end

#freeObject



8
# File 'lib/cloudscopes/filesystem.rb', line 8

def free; bfree * bsize; end

#totalObject



7
# File 'lib/cloudscopes/filesystem.rb', line 7

def total; blocks * bsize; end