b.t.p.PathFilteringServer(Server) : class documentation

Part of bzrlib.transport.pathfilter View In Hierarchy

Known subclasses: bzrlib.tests.test_server.TestingPathFilteringServer, bzrlib.transport.chroot.ChrootServer

Transport server for PathFilteringTransport.

It holds the backing_transport and filter_func for PathFilteringTransports. All paths will be passed through filter_func before calling into the backing_transport.

Note that paths returned from the backing transport are not altered in anyway. So, depending on the filter_func, PathFilteringTransports might not conform to the usual expectations of Transport behaviour; e.g. 'name' in t.list_dir('dir') might not imply t.has('dir/name') is True! A filter that merely prefixes a constant path segment will be essentially transparent, whereas a filter that does rot13 to paths will break expectations and probably cause confusing errors. So choose your filter_func with care.

Method __init__ Constructor.
Method get_url Undocumented
Method start_server Setup the server to service requests.
Method stop_server Remove the server and cleanup any resources it owns.
Method _factory Undocumented
def __init__(self, backing_transport, filter_func):
Constructor.
Parametersbacking_transporta transport
filter_funca callable that takes paths, and translates them into paths for use with the backing transport.
def _factory(self, url):
Undocumented
def get_url(self):
Undocumented
def start_server(self):
Setup the server to service requests.
def stop_server(self):
Remove the server and cleanup any resources it owns.
API Documentation for Bazaar, generated by pydoctor at 2020-01-26 00:37:26.