ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/git/index/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/git/index/__pycache__/util.cpython-311.pyc |
� �܋f� � �Z � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl mZ ddl mZmZmZmZmZ ddlmZmZ erddlmZ d Zej Zej Z G d � de� � Zded ef ded ef fd�Zded ef ded ef fd�Zded ef ded ef fd�ZdS )z!Module containing index utilities� )�wrapsN)� TracebackType)�is_win)�Any�Callable� TYPE_CHECKING�Optional�Type)�PathLike�_T)� IndexFile)�TemporaryFileSwap�post_clear_cache� default_index�git_working_dirc �v � e Zd ZdZdZdeddfd�Zdd�Zdee e d ee d ee defd�Z dS ) r z�Utility class moving a file to a temporary location within the same directory and moving it back on to where on object deletion.)� file_path� tmp_file_pathr �returnNc �� � || _ t | j � � t j ddd� � z | _ t j | j | j � � d S # t $ r Y d S w xY w)N� )r �str�tempfile�mktempr �os�rename�OSError)�selfr s �_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/index/util.py�__init__zTemporaryFileSwap.__init__* sr � �"��� ���0�0�8�?�2�r�2�3N�3N�N��� ��I�d�n�d�&8�9�9�9�9�9��� � � ��D�D� ���s �A � A(�'A(c � � | S �N� )r s r � __enter__zTemporaryFileSwap.__enter__3 s � ��� �exc_type�exc_val�exc_tbc �� � t j | j � � rXt r2t j | j � � rt j | j � � t j | j | j � � dS )NF) �osp�isfiler r �existsr r �remover )r r&