1 require 'mogilefs/backend'
4 # MogileFS::Client is the MogileFS client base class. Concrete clients like
5 # MogileFS::MogileFS and MogileFS::Admin are implemented atop this one to do
11 # The backend connection for this client
15 attr_accessor :hosts if defined? $TESTING
18 # Creates a new Client. See MogileFS::Backend#initialize for how to specify
19 # hosts. If :readonly is set to true, the client will not modify anything
22 # MogileFS::Client.new :hosts => ['kaa:6001', 'ziz:6001'], :readonly => true
26 @readonly = args[:readonly] ? true : false
27 @timeout = args[:timeout]
33 # Creates a new MogileFS::Backend.
36 @backend = MogileFS::Backend.new :hosts => @hosts, :timeout => @timeout
40 # The last error reported by the backend.
49 # The last error message reported by the backend.
58 # Is this a read-only client?