B
    '‹d  ã               @   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	   úb/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/send2trash/mac/modern.pyÚcheck_op_result   s    r   c             C   sP   t | ƒ} dd„ | D ƒ} x4| D ],}t |¡}t ¡ }| |d d ¡}t|ƒ qW 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   