# 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):


import stat
import os
import pwd
import grp
from libxyz.vfs import types as vfstypes
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# XYZCommander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser Public License for more details.
# You should have received a copy of the GNU Lesser Public License
# along with XYZCommander. If not, see <http://www.gnu.org/licenses/>.



_types = (
          (stat.S_ISDIR,  vfstypes.VFSTypeDir),
          (stat.S_ISCHR,  vfstypes.VFSTypeChar),
          (stat.S_ISBLK,  vfstypes.VFSTypeBlock),
          (stat.S_ISREG,  vfstypes.VFSTypeFile),
          (stat.S_ISFIFO, vfstypes.VFSTypeFifo),
          (stat.S_ISLNK,  vfstypes.VFSTypeLink),
          (stat.S_ISSOCK, vfstypes.VFSTypeSocket),
          )

_types2 = {"d": vfstypes.VFSTypeDir,
           "c": vfstypes.VFSTypeChar,
           "b": vfstypes.VFSTypeBlock,
           "-": vfstypes.VFSTypeFile,
           "p": vfstypes.VFSTypeFifo,
           "l": vfstypes.VFSTypeLink,
           "s": vfstypes.VFSTypeSocket,
          }


# 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
import stat
import os
import pwd
import grp
from libxyz.vfs import types as vfstypes

# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# XYZCommander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser Public License for more details.
# You should have received a copy of the GNU Lesser Public License
# along with XYZCommander. If not, see <http://www.gnu.org/licenses/>.



_types = (
          (stat.S_ISDIR,  vfstypes.VFSTypeDir),
          (stat.S_ISCHR,  vfstypes.VFSTypeChar),
          (stat.S_ISBLK,  vfstypes.VFSTypeBlock),
          (stat.S_ISREG,  vfstypes.VFSTypeFile),
          (stat.S_ISFIFO, vfstypes.VFSTypeFifo),
          (stat.S_ISLNK,  vfstypes.VFSTypeLink),
          (stat.S_ISSOCK, vfstypes.VFSTypeSocket),
          )

_types2 = {"d": vfstypes.VFSTypeDir,
           "c": vfstypes.VFSTypeChar,
           "b": vfstypes.VFSTypeBlock,
           "-": vfstypes.VFSTypeFile,
           "p": vfstypes.VFSTypeFifo,
           "l": vfstypes.VFSTypeLink,
           "s": vfstypes.VFSTypeSocket,
          }


def get_file_type(st_mode):