# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"


import os
import os.path
from libxyz import const
#-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# 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/>.

"""
Class is used to select first appropriate path.
"""



class PathSelector(object):
    """
    Class is used to select first appropriate path.
    Common rule is to load system file first and then user's one
    """

    def __init__(self):
        self.user_dir = os.path.join(os.path.expanduser("~"), const.USER_DIR)

# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"


# Path: libxyz/pselector.py
import os
import os.path
from libxyz import const

#-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# 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/>.

"""
Class is used to select first appropriate path.
"""



class PathSelector(object):
    """
    Class is used to select first appropriate path.
    Common rule is to load system file first and then user's one
    """

    def __init__(self):
        self.user_dir = os.path.join(os.path.expanduser("~"), const.USER_DIR)

        self.system_dir = const.SYSTEM_DIR