# Path: libxyz/exceptions.py
# class XYZRuntimeError(XYZError):
#     pass


import os
import os.path
import libxyz.const
from libxyz.exceptions import XYZRuntimeError
        Delete file in user-directory
        """

        _path = self.makepath(filename, subdir)

        if os.path.isfile(_path):
            try:
                os.unlink(_path)
            except OSError, e:
                raise XYZRuntimeError(e)

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

    def makepath(self, filename, subdir=None):
        """
        Make absolute path to file
        """

        _path = [self.user_dir]

        if subdir is not None:
            _path.append(subdir)

            _prelpath = os.path.join(*_path)

            # Create subdirectory if it doesn't exist
            if not os.access(_prelpath, os.F_OK):
                try:
                    os.mkdir(_prelpath)
                except OSError, e:

# Path: libxyz/exceptions.py
# class XYZRuntimeError(XYZError):
#     pass


# Path: libxyz/core/userdata.py
import os
import os.path
import libxyz.const
from libxyz.exceptions import XYZRuntimeError

        Delete file in user-directory
        """

        _path = self.makepath(filename, subdir)

        if os.path.isfile(_path):
            try:
                os.unlink(_path)
            except OSError, e:
                raise XYZRuntimeError(e)

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

    def makepath(self, filename, subdir=None):
        """
        Make absolute path to file
        """

        _path = [self.user_dir]

        if subdir is not None:
            _path.append(subdir)

            _prelpath = os.path.join(*_path)

            # Create subdirectory if it doesn't exist
            if not os.access(_prelpath, os.F_OK):
                try:
                    os.mkdir(_prelpath)
                except OSError, e:

                    raise XYZRuntimeError(e)