| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Storage --+
|
TarFileStorage
|
|||
|
|||
|
|||
| object |
|
||
| StorageResourceInfo or subclass |
|
||
|
|||
|
|||
| object |
|
||
| string |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
| bool |
|
||
| dict |
|
||
| tuple |
|
||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Simple tar archive storage for amplee. If storage path does not exist, it is created. Keyword arguments: storage_path -- absolute path to the top level directory which will contain collections and resources compression -- should be either None for no compression, gz for a gzip compression or bz2 for a bzip2 compression scheme. encoding -- used to encode the path elements
|
|
Creates a subdirectory within the storage directory If it already exists does nothing. Keyword argument collection_name -- name of the directory to create
|
|
Returns teh correct file mode to open an archive. Keyword arguments: opening_mode -- how to open the archive, either in read mode 'r' or in write mode 'w' |
Returns the name of the archive with the correct extension depending on the compression set on the storage. Removes any extension in resource_name. Keyword arguments: resoure_name -- any resource name value |
Returns a list of tuples (StorageResourceInfo instance, content) based on provided path. If the info.key.archive_sub_path is None, then the returned list contains all the members of the archive and therefore its entire content. Otherwise it returns only one single tuple matching the info.key.archive_sub_path value. Note also that the data read from the archive is not decoded and is therefore returned as a byte string. Keyword arguments info -- as returned by info()
|
Returns a byte string of the atom entry representing the member resource. Note also that the data read from the archive is not decoded and is therefore returned as a byte string. Keyword arguments info -- as returned by info()
|
Replaces the tar achive at ``info.key`` with a new set of content. The ``content`` parameter is a list of tuples of the following form: (member_name_of_the_archive, data, data_length). The first part of the tuple is the name used as the member of the archive The second part is the data to be persisted. Thus must be a byte string, unicode string or a fileobject which MUST return the full content as a byte string on read() The last part is the size to read from data and to persist into the archive. Note that if the data is unicode, it will be encoded using UTF-8. Keyword arguments info -- as returned by info() content -- list of tuples of the data to persist
|
Replaces the tar achive at ``info.key`` with a new set of content. Keyword arguments info -- as returned by info() content -- byte string, unicode string or a file object which returns the full data as a byte string on read() and return the correct length on __len__
|
Remove the resource at 'info.key' Keyword arguments info -- as returned by info()
|
Remove the resource at 'info.key' Keyword arguments info -- as returned by info()
|
|
Returns True if the resource at 'info' exists. False otherwise. If info.key.archive_sub_path is set it will lookup in the archive if it exists. Keyword arguments info -- as returned by info()
|
List resources with the provided extension in a collection Note that this will open each archive within the collection that matches the compression set for the storage: * 'gz' will result in searching through '*.tar.gz' * 'bz2' will result in searching through '*.tar.bz2' * None will result in searching through '*.tar' The speed of this method will therefore decrease with the number of archives stored. Keyword arguments collection_name -- name of the directory in the working copy containing all the members of a collection. Created if it does not exists. ext -- extension of resources to return
|
Yields resources with the provided extension in a collection Note that this will open each archive within the collection that matches the compression set for the storage: * 'gz' will result in searching through '*.tar.gz' * 'bz2' will result in searching through '*.tar.bz2' * None will result in searching through '*.tar' The speed of this method will therefore decrease with the number of archives stored. Keyword arguments collection_name -- name of the directory in the working copy containing all the members of a collection. Created if it does not exists. ext -- extension of resources to return
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Feb 17 14:54:46 2008 | http://epydoc.sourceforge.net |