o
    ¹¼tfö  ã                   @   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   é   )ÚOSErrorZlocalizedFailureReason)Ú	op_result© r	   ú^/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/send2trash/mac/modern.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   ZfileURLWithPath_r   ZdefaultManagerZ&trashItemAtURL_resultingItemURL_error_r   )Úpathsr   Úfile_urlÚfmr   r	   r	   r
   Ú
send2trash   s   

ür   N)	Z
Foundationr   r   Zsend2trash.compatr   Zsend2trash.utilr   r   r   r	   r	   r	   r
   Ú<module>   s
   