a
    õ£Be  ã                   @   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	   úX/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/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>   ó    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   