OwlCyberSecurity - MANAGER
Edit File: filepath.pyc
� 7��ac @@ s� d d l m Z d g Z d d l m Z d d l m Z m Z m Z m Z d d l m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d e e f d � � YZ e e _ d S( i ( t absolute_importt CachingFilePath( t listdir( t joint basenamet existst dirname( t sleep( t FunctionTypet MethodType( t EINVAL( t S_ISDIR( t FilePathc B@ sw e Z d Z e Z e Z d Z e d � Z e d � � Z d � Z d � Z d � Z e d � Z e d � Z d � Z RS( s] A descendent of L{_FilePath} which implements a more aggressive caching policy. g @c C@ s/ t t | � j | | � d | _ d | _ d S( N( t superR t __init__t Nonet existsCachedt isDirCached( t selft patht alwaysCreate( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR 0 s c C@ sK t t t j j j i | j d 6t d 6t d 6t d 6t d 6� | | j � S( s� Dynamically create a version of L{_FilePath.siblingExtensionSearch} that uses a pluggable L{listdir} implementation. R R R t joinpathR ( R R t _FilePatht siblingExtensionSearcht im_funct func_codet _retryListdirR R R R t __class__( R ( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR 5 s c C@ s d | _ d | _ d | _ d S( sr This path may have changed in the filesystem, so forget all cached information about it. N( R t statinfoR R ( R ( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyt changedI s c C@ s� d } xi t rq y | j | � SWq t k rm } | j t k rg | j | � t | j | d � } qn � q Xq Wt d � � d S( se Implementation of retry logic for C{listdir} and C{siblingExtensionSearch}. g�������?g @s unreachable code.N( t Truet _listdirt OSErrort errnoR t _sleept mint BACKOFF_MAXt AssertionError( R t pathnamet delayt e( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR R s c C@ s | j | j � S( sv List the directory which C{self.path} points to, compensating for EINVAL from C{os.listdir}. ( R R ( R ( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR e s c C@ s^ z t t | � j | � SWd | j rG t | _ t | j j � | _ n t | _ d | _ Xd S( s, Re-cache stat information. N( R R t restatR R R R t st_modeR t FalseR ( R t reraise( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR) l s c C@ sE t t | � j | | � } | j � t | d � rA | j � n | S( si Override L{_FilePath.moveTo}, updating extended cache information if necessary. R ( R R t moveToR t hasattr( R t destinationt followLinkst result( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR- z s c C@ s) z t t | � j � SWd | j � Xd S( si Override L{_FilePath.remove}, updating extended cache information if necessary. N( R R t removeR ( R ( ( sH /opt/cpanel-ccs/.develop/virtualenv/src/twextpy/twext/python/filepath.pyR2 � s ( t __name__t __module__t __doc__R R R R"