b.s.TransportStore(Store) : class documentation

Part of bzrlib.store View In Hierarchy

Known subclasses: bzrlib.store.text.TextStore, bzrlib.store.versioned.VersionedFileStore, bzrlib.tests.test_store.InstrumentedTransportStore

A TransportStore is a Store superclass for Stores that use Transports.
Method add Add contents of a file into the store.
Method has_id See Store.has_id.
Method get See Store.get().
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method listable Return True if this store is able to be listed.
Method register_suffix Register a suffix as being expected in this store.
Method total_size Return (count, bytes)
Method _add Actually add the file to the given location.
Method _check_fileid Undocumented
Method _id_to_names Return the names in the expected order
Method _get_name A special check, which returns the name of an existing file.
Method _get Return an vanilla file stream for clients to read from.
Method _iter_files_recursive Iterate through the files in the transport.
Method _relpath Undocumented

Inherited from Store:

Method __getitem__ DEPRECATED. Please use .get(fileid) instead.
Method copy_all_ids Copy all the file ids from store_from into self.
Method copy_multi Copy texts for ids from other into self.
Method _copy_one Most generic copy-one object routine.
def add(self, f, fileid, suffix=None):
Add contents of a file into the store.

f -- A file-like object

def _add(self, relpath, f):
Actually add the file to the given location. This should be overridden by children.
def _check_fileid(self, fileid):
Undocumented
def _id_to_names(self, fileid, suffix):
Return the names in the expected order
def has_id(self, fileid, suffix=None):
See Store.has_id.
def _get_name(self, fileid, suffix=None):
A special check, which returns the name of an existing file.

This is similar in spirit to 'has_id', but it is designed to return information about which file the store has.

def _get(self, filename):
Return an vanilla file stream for clients to read from.

This is the body of a template method on 'get', and should be implemented by subclasses.

def get(self, fileid, suffix=None):
See Store.get().
def __init__(self, a_transport, prefixed=False, compressed=False, dir_mode=None, file_mode=None, escaped=False):
Undocumented
def _iter_files_recursive(self):
Iterate through the files in the transport.
def __iter__(self):
Undocumented
def __len__(self):
Undocumented
def _relpath(self, fileid, suffixes=None):
Undocumented
def __repr__(self):
Undocumented
def listable(self):
Return True if this store is able to be listed.
def register_suffix(self, suffix):
Register a suffix as being expected in this store.
def total_size(self):
Return (count, bytes)

This is the (compressed) size stored on disk, not the size of the content.

API Documentation for Bazaar, generated by pydoctor at 2019-11-13 00:26:04.