b.o.UnicodeDirReader(DirReader) : class documentation

Part of bzrlib.osutils View In Hierarchy

A dir reader for non-utf8 file systems, which transcodes.
Method __init__ Undocumented
Method top_prefix_to_starting_dir See DirReader.top_prefix_to_starting_dir.
Method read_dir Read a single directory from a non-utf8 file system.
def __init__(self):
Undocumented
def top_prefix_to_starting_dir(self, top, prefix=''):
See DirReader.top_prefix_to_starting_dir.
def read_dir(self, prefix, top):
Read a single directory from a non-utf8 file system.

top, and the abspath element in the output are unicode, all other paths are utf8. Local disk IO is done via unicode calls to listdir etc.

This is currently the fallback code path when the filesystem encoding is not UTF-8. It may be better to implement an alternative so that we can safely handle paths that are not properly decodable in the current encoding.

See DirReader.read_dir for details.

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.