
    Ybc                         d dl mZ ddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ efdZd Zd Zd Zd Zd Zd Zd Zy)    )absolute_import   )ARCHIVE)AUDIO)APPLICATION)DOCUMENT)FONT)IMAGE)VIDEO)TYPES)	get_bytesc                 R    t        |       }|D ]  }|j                  |      s|c S  y)a  
    Matches the given input against the available
    file type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if type matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    N)r   match)objmatchersbufmatchers       0/usr/lib/python3/dist-packages/filetype/match.pyr   r      s2     C.C ==N     c                 "    t        | t              S )a
  
    Matches the given input against the available
    image type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   image_matchersr   s    r   image_matchr   '        n%%r   c                 "    t        | t              S )a	  
    Matches the given input against the available
    font type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   font_matchersr   s    r   
font_matchr   8   s     m$$r   c                 "    t        | t              S )a
  
    Matches the given input against the available
    video type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   video_matchersr   s    r   video_matchr    I   r   r   c                 "    t        | t              S )a
  
    Matches the given input against the available
    autio type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   audio_matchersr   s    r   audio_matchr#   Z   r   r   c                 "    t        | t              S )a  
    Matches the given input against the available
    archive type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   archive_matchersr   s    r   archive_matchr&   k   s     &''r   c                 "    t        | t              S )a  
    Matches the given input against the available
    application type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   application_matchersr   s    r   application_matchr)   |   s     *++r   c                 "    t        | t              S )a  
    Matches the given input against the available
    document type matchers.

    Args:
        obj: path to file, bytes or bytearray.

    Returns:
        Type instance if matches. Otherwise None.

    Raises:
        TypeError: if obj is not a supported type.
    )r   document_matchersr   s    r   document_matchr,      s     '((r   N)
__future__r   typesr   r%   r   r"   r   r(   r   r+   r	   r   r
   r   r   r   r   utilsr   r   r   r   r    r#   r&   r)   r,    r   r   <module>r1      sR    ' . * 6 0 ( * *    .&"%"&"&"(",")r   