class EC2::Platform::Linux::Mtab
Constants
- LOCATION
Attributes
entries[R]
Public Class Methods
load()
click to toggle source
# File lib/ec2/platform/linux/mtab.rb, line 68 def self.load self.new() end
new(filename = LOCATION)
click to toggle source
# File lib/ec2/platform/linux/mtab.rb, line 55 def initialize(filename = LOCATION) begin f = File.new(filename, File::RDONLY) rescue SystemCallError => e raise FileError(filename, "could not open #{filename} to read mount table", e) end @entries = Hash.new f.readlines.each do |line| entry = Entry.parse(line) @entries[entry.mpoint] = entry unless entry.nil? end end