Representation of a Object Storage object.
constructor for StorageObject
@param container: container name @param name: object name @param headers: init headers to use when initializing the object @param client: object_storage.client instance.
Tries to load the object to check existance
@raises ResponseError @return: boolean, true if exists else false
load data for the object
@param cdn: True if you want CDN information; default=True @return: object_storage.storage_object, self
loads data if not already available and returns the properties
Uses sudo-hierarchical structure to list the children objects.
@param limit: limit of results to return. @param marker: start listing after this object name @raises ResponseError @return: list of StorageObject instances
Sets metadata for the object
@param meta: dict of metadata on the object @raises ResponseError
Reads object content
@param size: number of bytes to read (0 reads all of the object data) @param offset: number of bytes to offset the read @raises ResponseError @return: str, data
Reads object content into a file
@param filename: filename @raises ResponseError
Returns an iterator to read the object data.
@raises: ResponseError @return: iterable
Returns an iterator to read the object data.
@raises: ResponseError @return: iterable
@param headers: extra headers to use to initialize the request @raises: ResponseError @return: object that responds to o.send(‘data’) to send data
and o.finish() to finish the upload.
Uploads object data
@param data: either a file-like object or a string. @raises: ResponseError @return: StorageObject, self
Uploads object data
@param data: either a file-like object or a string. @raises: ResponseError @return: StorageObject, self
Uploads an entire directory
@param directory: path of the directory to upload @raises: ResponseError
Uploads a file from the local filename
@param filename: path of the directory to upload @raises: ResponseError, IOError
Copies content from an existing object
@param old_obj: StorageObject instance to copy data from @raises: ResponseError @return: StorageObject, self
Copies content from an existing object
@param new_obj: StorageObject instance to copy data to @raises: ResponseError @return: StorageObject, new_obj