<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __raise_file_system_exception(self, item, directory):
 """ Raises a common fileSystem exception. :param item: Name of the item generating the exception. :type item: unicode :param directory: Name of the target directory. :type directory: unicode """


        path = os.path.join(directory, item)
        if os.path.isfile(path):
            raise foundations.exceptions.FileExistsError(
                "{0} | A file with '{1}' name already exists in '{2}' directory!".format(self.__class__.__name__,
                                                                                         item,
                                                                                         directory))
        else:
            raise foundations.exceptions.DirectoryExistsError(
                "{0} | A directory with '{1}' name already exists in '{2}' directory!".format(self.__class__.__name__,
                                                                                              item,
                                                                                              directory))