o
    “^©iá  ã                   @   s0   d dl mZmZ d dlmZ dd„ Zdd„ ZdS )é    )ÚNSFileManagerÚNSURL)Úpreprocess_pathsc                 C   s   | d st | d  ¡ ƒ‚d S )Nr   é   )ÚOSErrorÚlocalizedFailureReason)Ú	op_result© r	   úP/home/ubuntu/hpml_nyu/venv/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)Ú
isinstanceÚstrÚ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   Úsend2trash.utilr   r   r   r	   r	   r	   r
   Ú<module>   s   