o
    †Q `¸  ã                   @   sp   d dl Z z
d dlmZmZ W n ey   d dlmZmZ Y nw z	d dlmZ W dS  ey7   dd„ ZY dS w )é    N)ÚfsencodeÚfsdecode)Úfspathc                 C   s€   t | tjtfƒr
| S t| ƒ}z| | ¡}W n ty)   t|dƒr"‚ td|j	 ƒ‚w t |tjtfƒr4|S td 
|j	t|ƒj	¡ƒ‚)au  Return the path representation of a path-like object.

        If str or bytes is passed in, it is returned unchanged. Otherwise the
        os.PathLike interface is used to get the path representation. If the
        path representation is not str or bytes, TypeError is raised. If the
        provided path is not str, bytes, or os.PathLike, TypeError is raised.
        Ú
__fspath__z0expected string type or os.PathLike object, not z5expected {}.__fspath__() to return string type not {})Ú
isinstanceÚsixZ	text_typeÚbytesÚtyper   ÚAttributeErrorÚhasattrÚ	TypeErrorÚ__name__Úformat)ÚpathÚ	path_typeÚ	path_repr© r   ú./usr/lib/python3/dist-packages/fs/_fscompat.pyr      s(   
ÿÿüþr   )r   Úosr   r   ÚImportErrorZbackports.osr   r   r   r   r   Ú<module>   s    ÿþ