Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/tracer/resources/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/tracer/resources/__pycache__/FilenameCleaner.cpython-36.opt-1.pyc

3

"e��@sGdd�de�ZdS)c@sHeZdZedd��Zedd��Zedd��Zedd��Zed	d
��ZdS)�FilenameCleanercCs�tj|�}yN|jd�}|d|�}||dd�}d|krNtj|�}tj|�}|d|Stk
rlYntk
r~YnX|S)N�/��.)r�_strip_abnormalities�rindex�_strip_around_so_delimited_dots�_strip_after_dash�
IndexError�
ValueError)�filenameZslash�dirname�basename�r�%/usr/lib/python3.6/FilenameCleaner.py�strips



zFilenameCleaner.stripcCszy|d|jd��}Wntk
r*YnX|jd�rB|dd�}d|kr\|d|jd��}d|krv|d|jd��}|S)N� z#new���;z.#prelink#.���)�indexr
�endswithr)rrrrr/s
z$FilenameCleaner._strip_abnormalitiescCs�yV|jd�}|d}t|�dkr(|d7}|jd�}|jd�}|d|�||d�}Wn&tk
rjYntk
r|YnX|S)Nz.sorrr)�split�lenrrr	r
)r
rZfirst_dot_iZ
last_dot_irrrrFs


z/FilenameCleaner._strip_around_so_delimited_dotscCstyH|jd�}|jd|�}tj||d|��rF|d|�||d�}Wn&tk
r\Yntk
rnYnX|S)N�-rr)rrr�_is_versionr	r
)r
Zdash�dotrrrrUs
z!FilenameCleaner._strip_after_dashcCs(x"|D]}|j�s|dkrdSqWdS)z:
		Returns True if string contains only digits and dots
		rFT)�isdigit)�string�charrrrras
zFilenameCleaner._is_versionN)	�__name__�
__module__�__qualname__�staticmethodrrrrrrrrrrs
rN)�objectrrrrr�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists