Class: RFuse::StatVfs

Inherits:
Object
  • Object
show all
Defined in:
lib/rfuse.rb

Overview

Helper class to return from :statfs (eg for df output) All attributes are Integers and default to 0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values = { }) ⇒ StatVfs

values can be symbols or strings but drop the pointless f_ prefix



637
638
639
640
641
642
643
# File 'lib/rfuse.rb', line 637

def initialize(values={ })
    @f_bsize, @f_frsize, @f_blocks, @f_bfree, @f_bavail, @f_files, @f_ffree, @f_favail,@f_fsid, @f_flag,@f_namemax = Array.new(13,0)
    values.each_pair do |k,v|
        prefix = k.to_s.start_with?("f_") ? "" : "f_"
        instance_variable_set("@#{prefix}#{k}",v)
    end
end

Instance Attribute Details

#f_bavailInteger

Returns:

  • (Integer)


631
632
633
# File 'lib/rfuse.rb', line 631

def f_bavail
  @f_bavail
end

#f_bfreeInteger

Returns:

  • (Integer)


631
632
633
# File 'lib/rfuse.rb', line 631

def f_bfree
  @f_bfree
end

#f_blocksInteger

Returns:

  • (Integer)


631
632
633
# File 'lib/rfuse.rb', line 631

def f_blocks
  @f_blocks
end

#f_bsizeInteger

Returns:

  • (Integer)


631
632
633
# File 'lib/rfuse.rb', line 631

def f_bsize
  @f_bsize
end

#f_favailInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_favail
  @f_favail
end

#f_ffreeInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_ffree
  @f_ffree
end

#f_filesInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_files
  @f_files
end

#f_flagInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_flag
  @f_flag
end

#f_frsizeInteger

Returns:

  • (Integer)


631
632
633
# File 'lib/rfuse.rb', line 631

def f_frsize
  @f_frsize
end

#f_fsidInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_fsid
  @f_fsid
end

#f_namemaxInteger

Returns:

  • (Integer)


634
635
636
# File 'lib/rfuse.rb', line 634

def f_namemax
  @f_namemax
end