o
    *ήc                     @   s   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dZdd Zdd Zdd Zdd Zdd Zdd Zdd ZdS )    )absolute_import   )ARCHIVE)AUDIO)APPLICATION)DOCUMENT)FONT)IMAGE)VIDEO)TYPES)	get_bytesc                 C   s(   t | }|D ]}||r|  S qdS )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matcher r   5/tmp/pip-target-vg8gfxp4/lib/python/filetype/match.pyr      s   
r   c                 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   r   r   r   image_match'      
r   c                 C   r   )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   r   r   r   
font_match8   r   r   c                 C   r   )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   r   r   r   video_matchI   r   r   c                 C   r   )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   r   r   r   audio_matchZ   r   r   c                 C   r   )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   r   r   r   archive_matchk   r   r    c                 C   r   )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   r   r   r   application_match|   r   r"   c                 C   r   )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   r   r   r   document_match   r   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   r   r   <module>   s$   