# Path: libxyz/core/utils.py
# def bstring(bstr, enc=None):
#     """
#     Return encoded byte string
#     """
# 
#     if isinstance(bstr, str):
#         return bstr
#     
#     if enc is None:
#         enc = xyzenc
# 
#     if not isinstance(bstr, unicode):
#         return str(bstr)
# 
#     return bstr.encode(enc, 'replace')
# 
# def ustring(string, enc=None):
#     """
#     Return unicode string
#     """
# 
#     if isinstance(string, unicode):
#         return string
# 
#     if enc is None:
#         enc = xyzenc
# 
#     if not isinstance(string, str):
#         return unicode(string)
# 
#     # String
#     return string.decode(enc, 'replace')
# 
# Path: libxyz/vfs/types.py
# class VFSTypeBase(object):
# class VFSTypeFile(VFSTypeBase):
# class VFSTypeBlock(VFSTypeBase):
# class VFSTypeChar(VFSTypeBase):
# class VFSTypeDir(VFSTypeBase):
# class VFSTypeLink(VFSTypeBase):
# class VFSTypeFifo(VFSTypeBase):
# class VFSTypeSocket(VFSTypeBase):
# class VFSTypeUnknown(VFSTypeBase):
#     def __unicode__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
# 
# Path: libxyz/vfs/util.py
# def get_file_type(st_mode):
# def format_size(size):
# def split_path(path):
# def get_user(uid=None):
# def get_group(gid=None):


import os
from libxyz.core.utils import bstring, ustring
from libxyz.vfs import types, util

        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def tell(self):
        """
        Tell file position
        """

        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def seek(self, offset, whence=None):
        """
        Perform seek() on object
        """

        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def in_dir(self, d, e):
        """
        Filter only those archive entries which exist in the same
        directory level
        """

        if e.startswith(d.lstrip(os.sep)) and \

# Path: libxyz/core/utils.py
# def bstring(bstr, enc=None):
#     """
#     Return encoded byte string
#     """
# 
#     if isinstance(bstr, str):
#         return bstr
#     
#     if enc is None:
#         enc = xyzenc
# 
#     if not isinstance(bstr, unicode):
#         return str(bstr)
# 
#     return bstr.encode(enc, 'replace')
# 
# def ustring(string, enc=None):
#     """
#     Return unicode string
#     """
# 
#     if isinstance(string, unicode):
#         return string
# 
#     if enc is None:
#         enc = xyzenc
# 
#     if not isinstance(string, str):
#         return unicode(string)
# 
#     # String
#     return string.decode(enc, 'replace')
# 
# Path: libxyz/vfs/types.py
# class VFSTypeBase(object):
# class VFSTypeFile(VFSTypeBase):
# class VFSTypeBlock(VFSTypeBase):
# class VFSTypeChar(VFSTypeBase):
# class VFSTypeDir(VFSTypeBase):
# class VFSTypeLink(VFSTypeBase):
# class VFSTypeFifo(VFSTypeBase):
# class VFSTypeSocket(VFSTypeBase):
# class VFSTypeUnknown(VFSTypeBase):
#     def __unicode__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
# 
# Path: libxyz/vfs/util.py
# def get_file_type(st_mode):
# def format_size(size):
# def split_path(path):
# def get_user(uid=None):
# def get_group(gid=None):


# Path: libxyz/vfs/vfsobj.py
import os
from libxyz.core.utils import bstring, ustring
from libxyz.vfs import types, util


        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def tell(self):
        """
        Tell file position
        """

        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def seek(self, offset, whence=None):
        """
        Perform seek() on object
        """

        raise NotImplementedError(self.__ni_msg)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def in_dir(self, d, e):
        """
        Filter only those archive entries which exist in the same
        directory level
        """

        if e.startswith(d.lstrip(os.sep)) and \

           len(util.split_path(e)) == (len(util.split_path(d)) + 1):