File: //opt/alt/python311/lib/python3.11/site-packages/s3transfer/__pycache__/compat.cpython-311.pyc
�
/�;f� � � � d dl Z d dlZd dlZd dlZd dlZd dlmZ ej � d� � rd� Z nej
Z d� ZeZ
dZd� Zd� Zd� Zd d lmZ dS )
� N)�six�winc � � t j |� � n-# t $ r }|j t j k s� Y d }~nd }~ww xY wt j | |� � d S )N)�os�remove�OSError�errno�ENOENT�rename)�current_filename�new_filename�es �D/opt/alt/python311/lib/python3.11/site-packages/s3transfer/compat.py�rename_filer sy � � ��I�l�#�#�#�#��� � � ��7�e�l�*�*�
� +�*�*�*�*����� ���� � �"�L�1�1�1�1�1s � �
A�<�Ac �6 � t j | � � d S )N� )�inspect�getfullargspec)�funcs r �accepts_kwargsr % s � ��!�$�'�'��*�*� c �� � t | d� � r| � � � S t | d� � r:t | d� � r* | � dd� � dS # t $ r Y dS w xY wdS )z�Backwards compat function to determine if a fileobj is seekable
:param fileobj: The file-like object to determine if seekable
:returns: True, if seekable. False, otherwise.
�seekable�seek�tellr � TF)�hasattrr r r ��fileobjs r r r 1 s� � � �w�
�#�#�
����!�!�!�
��&� !� !� �g�g�v�&>�&>� � ��L�L��A�����4��� � � ��5�5� ���� �5s �A �
A,�+A,c �j � t | d� � r| � � � S t | d� � S )z�Determines whether or not a file-like object is readable.
:param fileobj: The file-like object to determine if readable
:returns: True, if readable. False otherwise.
�readable�read)r r! r s r r! r! I s8 � � �w�
�#�#� "����!�!�!��7�F�#�#�#r c � � t t d� � r*t j | � � � d|� � d S | � |� � d S )N�posix_fallocater )r r r$ �fileno�truncate)r �sizes r � fallocater( V sT � ��r�$�%�%� �
��7�>�>�+�+�Q��5�5�5�5�5���������r )�BaseManager)r r r �socket�sys�botocore.compatr �platform�
startswithr r r �ConnectionError�SOCKET_ERROR�MAXINTr r! r( �multiprocessing.managersr) � r r �<module>r4 s� ��
���� ���� � � � �
�
�
�
�
�
�
�
� � � � � � ��<���5�!�!�
�
2�
2�
2�
2� �)�K�+� +� +� ��
��� � �0
$�
$�
$�� � � 1� 0� 0� 0� 0� 0� 0� 0r