1 # -*- encoding: binary -*-
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
10 # The backend connection for this client
14 attr_accessor :hosts if defined? $TESTING
17 # Creates a new Client. See MogileFS::Backend#initialize for how to specify
18 # hosts. If :readonly is set to true, the client will not modify anything
21 # MogileFS::Client.new :hosts => ['kaa:6001', 'ziz:6001'], :readonly => true
25 @readonly = args[:readonly] ? true : false
26 @timeout = args[:timeout]
32 # Creates a new MogileFS::Backend.
35 @backend = MogileFS::Backend.new :hosts => @hosts, :timeout => @timeout
39 # The last error reported by the backend.
46 # The last error message reported by the backend.
53 # Is this a read-only client?