o
    ¹¼tf8  ã                   @   sÀ   d dl mZ d dlmZmZmZmZmZ d dlm	Z	 d dl
mZ d dlmZ e e	dƒ¡Ze e	dƒ¡ZejZee_ejZejZd ZdZd ZdZd	Zd
ZdZG dd„ deƒZdd„ Zdd„ ZdS )é    )Úunicode_literals)ÚcdllÚbyrefÚ	StructureÚc_charÚc_char_p)Úfind_library)Úbinary_type)Úpreprocess_pathsÚ
FoundationÚCoreServicesé   é   é   é   c                   @   s   e Zd Zded fgZdS )ÚFSRefZhiddenéP   N)Ú__name__Ú
__module__Ú__qualname__r   Z_fields_© r   r   ú^/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/send2trash/mac/legacy.pyr   !   s    r   c                 C   s   | rt | ƒ d¡}t|ƒ‚d S )Núutf-8)ÚGetMacOSStatusCommentStringÚdecodeÚOSError)Ú	op_resultÚmsgr   r   r   Úcheck_op_result%   s   þr   c                 C   sd   t | ƒ} dd„ | D ƒ} | D ]"}tƒ }t}t||t|ƒd ƒ}t|ƒ t}tt|ƒd |ƒ}t|ƒ qd S )Nc                 S   s$   g | ]}t |tƒs| d ¡n|‘qS )r   )Ú
isinstancer	   Úencode)Ú.0Úpathr   r   r   Ú
<listcomp>-   s   $ zsend2trash.<locals>.<listcomp>)r
   r   Ú$kFSPathMakeRefDoNotFollowLeafSymlinkÚFSPathMakeRefWithOptionsr   r   ÚkFSFileOperationDefaultOptionsÚFSMoveObjectToTrashSync)Úpathsr"   ÚfpÚoptsr   r   r   r   Ú
send2trash+   s   
ùr+   N)Ú
__future__r   Úctypesr   r   r   r   r   Zctypes.utilr   Zsend2trash.compatr	   Zsend2trash.utilr
   ZLoadLibraryr   r   r   Úrestyper%   r'   ZkFSPathMakeRefDefaultOptionsr$   r&   ZkFSFileOperationOverwriteZ*kFSFileOperationSkipSourcePermissionErrorsZ&kFSFileOperationDoNotMoveAcrossVolumesZkFSFileOperationSkipPreflightr   r   r+   r   r   r   r   Ú<module>   s*   