OwlCyberSecurity - MANAGER
Edit File: zippath.pyc
� `��ac @` s d Z d d l m Z m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z d Z e e e � d e f d � � Y� � Z d e f d � � YZ d d g Z d S( st This module contains implementations of L{IFilePath} for zip files. See the constructor of L{ZipArchive} for use. i ( t absolute_importt divisionN( t ZipFile( t comparablet cmp( t IFilePatht FilePatht AbstractFilePath( t _coerceToFilesystemEncoding( t UnlistableError( t implementert /t ZipPathc B` s� e Z d Z d � Z d � Z d � Z e d � � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d d � Z d � Z d � Z d � Z d � Z d � Z RS( sF I represent a file or directory contained within a zip file. c C` s^ | | _ | | _ t | t � } t | | j j � } t j j | | j j | � � | _ d S( s� Don't construct me directly. Use C{ZipArchive.child()}. @param archive: a L{ZipArchive} instance. @param pathInArchive: a ZIP_PATH_SEP-separated string. N( t archivet pathInArchiveR t ZIP_PATH_SEPt zipfilet filenamet ost patht joint split( t selfR R t sept archiveFilename( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyt __init__% s c C` s8 t | t � s t St | j | j f | j | j f � S( N( t isinstanceR t NotImplementedR R R ( R t other( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyt __cmp__9 s c C` sl t | j t j j | j j � � g } | j | j j | j � � t | j t j � } d | j | � f S( Ns ZipPath(%r)( R R R R t abspathR t extendR R R ( R t partst ossep( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyt __repr__@ s $c C` s t | j t � S( s� Return a zip directory separator. @return: The zip directory separator. @returntype: The same type as C{self.path}. ( R R R ( R ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyR H s c C` sN | j j | j � } t | � d k r. | j St | j | j j | d � � S( Ni i����( R R R t lenR R R ( R t splitup( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyt parentS s c C` s@ t | t � } t | | j � } t | j | j | | g � � S( s& Return a new ZipPath representing a path in C{self.archive} which is a child of this path. @note: Requesting the C{".."} (or other special name) child will not cause L{InsecurePath} to be raised since these names do not have any special meaning inside a zip archive. Be particularly careful with the C{path} attribute (if you absolutely must use it) as this means it may include special names with special meaning outside of the context of a zip archive. ( R R R R R R ( R R t joinerR ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/zippath.pyt childZ s c C` s | j � j | � S( N( R% R'