import stat


def file_type2string(inode_type):
    """
    Return the string of file type
    """
    if inode_type == stat.S_IFDIR:
        return "directory"
    if inode_type == stat.S_IFCHR:
        return "character_device"
    if inode_type == stat.S_IFBLK:
        return "block_device"
    if inode_type == stat.S_IFREG:
        return "regular_file"
    if inode_type == stat.S_IFIFO:
        return "fifo"
    if inode_type == stat.S_IFLNK:
        return "symbolic_link"
    if inode_type == stat.S_IFSOCK:
        return "socket"
    return None