def initialize(container,objectname,force_exists=false,make_path=false)
if objectname.match(/\?/)
raise SyntaxException, "Object #{objectname} contains an invalid character in the name (? not allowed)"
end
@container = container
@containername = container.name
@name = objectname
@make_path = make_path
@storagehost = self.container.connection.storagehost
@storagepath = self.container.connection.storagepath+"/#{URI.encode(@containername).gsub(/&/,'%26')}/#{URI.encode(@name).gsub(/&/,'%26')}"
@storageport = self.container.connection.storageport
@storagescheme = self.container.connection.storagescheme
if container.object_exists?(objectname)
populate
else
raise NoSuchObjectException, "Object #{@name} does not exist" if force_exists
end
end