ó
Qº’Nc           @   sA   d  d l  Z  d  d l Z e j ƒ  Z d e j f d „  ƒ  YZ d S(   iÿÿÿÿNt	   FileCruftc           B   sM   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   sƒ  Cruft that is individual files.
    
    This type of cruft consists of individual files that should be
    removed. Various plugins may decide that various files are cruft;
    they can all use objects of FileCruft type to mark such files,
    regardless of the reason the files are considered cruft.
    
    When FileCruft instantiated, the file is identified by a pathname.
    
    c         C   s5   | |  _  t j | ƒ } | j d |  _ | |  _ d  S(   Ni   (   t   pathnamet   ost   statt	   st_blockst
   disk_usaget   description(   t   selfR   R   t   st(    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   __init__$   s    	c         C   s   d S(   Nt   file(    (   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt
   get_prefix*   s    c         C   s
   t  d ƒ S(   Ns   A file on disk(   t   _(   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   get_prefix_description-   s    c         C   s   |  j  S(   N(   R   (   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   get_shortname0   s    c         C   s   d |  j  S(   Ns   %s
(   R   (   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   get_description3   s    c         C   s   |  j  S(   N(   R   (   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   get_disk_usage6   s    c         C   s   t  j |  j ƒ d  S(   N(   R   t   removeR   (   R   (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   cleanup9   s    (
   t   __name__t
   __module__t   __doc__R	   R   R   R   R   R   R   (    (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyR       s   						(   R   t   computerjanitort   setup_gettextR   t   CruftR    (    (    (    s>   /usr/lib/python2.7/dist-packages/computerjanitor/file_cruft.pyt   <module>   s   