o
    ¹i  ã                   @   s<   d dl mZmZ ddlmZ ddlmZ dd„ Zdd„ Zd	S )
é    )ÚNSFileManagerÚNSURLé   )Ú	text_type)Úpreprocess_pathsc                 C   s   | d st | d  ¡ ƒ‚d S )Nr   é   )ÚOSErrorÚlocalizedFailureReason)Ú	op_result© r   úU/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/send2trash/plat_osx_pyobjc.pyÚcheck_op_result   s   þr   c                 C   sL   t | ƒ} dd„ | D ƒ} | D ]}t |¡}t ¡ }| |d d ¡}t|ƒ qd S )Nc                 S   s$   g | ]}t |tƒs| d ¡n|‘qS )zutf-8)Ú
isinstancer   Údecode)Ú.0Úpathr   r   r   Ú
<listcomp>   s    ÿÿzsend2trash.<locals>.<listcomp>)r   r   ÚfileURLWithPath_r   ÚdefaultManagerÚ&trashItemAtURL_resultingItemURL_error_r   )Úpathsr   Úfile_urlÚfmr
   r   r   r   Ú
send2trash   s   þ

ür   N)	Ú
Foundationr   r   Úcompatr   Úutilr   r   r   r   r   r   r   Ú<module>   s
   