<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filedet(name, fobj=None, suffix=None):
 """ Detect file type by filename. :param name: file name :param fobj: file object :param suffix: file suffix like ``py``, ``.py`` :return: file type full name, such as ``python``, ``bash`` """

    name = name or (fobj and fobj.name) or suffix
    separated = name.split('.')
    if len(separated) == 1:
        raise FiledetException('file name error.')

    key = '.' + separated[-1]
    return _file_type_map.get(key)