| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/lib/python3/dist-packages/twisted/python/__pycache__/ |
Upload File : |
U
W[$ � @ s� d Z ddlmZmZ ddlZddlZddlZddlmZ ddl m
Z
mZ ddlm
Z
mZmZ ddlmZ ddlmZ dd lmZ d
Ze
ee
�G dd� de���ZG d
d� de�ZddgZdS )zt
This module contains implementations of L{IFilePath} for zip files.
See the constructor of L{ZipArchive} for use.
� )�absolute_import�divisionN)�ZipFile)�
comparable�cmp)� IFilePath�FilePath�AbstractFilePath)�_coerceToFilesystemEncoding)�UnlistableError)�implementer�/c @ s� e Zd ZdZdd� Zdd� Zdd� Zedd � �Zd
d� Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd.d!d"�Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-S )/�ZipPathzF
I represent a file or directory contained within a zip file.
c C sD || _ || _t|t�}t||jj�}tjj|f| j� |��� | _dS )z�
Don't construct me directly. Use C{ZipArchive.child()}.
@param archive: a L{ZipArchive} instance.
@param pathInArchive: a ZIP_PATH_SEP-separated string.
N)
�archive�
pathInArchiver
�ZIP_PATH_SEP�zipfile�filename�os�path�join�split)�selfr r �sepZarchiveFilename� r �8/usr/lib/python3/dist-packages/twisted/python/zippath.py�__init__% s
�
�zZipPath.__init__c C s( t |t�stS t| j| jf|j|jf�S �N)�
isinstancer �NotImplementedr r r )r �otherr r r �__cmp__9 s
�zZipPath.__cmp__c C sL t | jtj�| jj��g}|�| j�| j�� t | jtj�}d|� |�f S )NzZipPath(%r))
r
r r r �abspathr �extendr r r )r �partsZossepr r r �__repr__@ s �zZipPath.__repr__c C s t | jt�S )z�
Return a zip directory separator.
@return: The zip directory separator.
@returntype: The same type as C{self.path}.
)r
r r �r r r r r H s zZipPath.sepc C s<