(self, fname)
Add ``fname`` in a checklist for the filestore garbage collection.
Add ``fname`` in a checklist for the filestore garbage collection.
Add fname in a checklist for the filestore garbage collection .
def _mark_for_gc(self, fname):
        """ Add ``fname`` in a checklist for the filestore garbage collection. """
        fname = re.sub('[.]', '', fname).strip('/\\')
        # we use a spooldir: add an empty file in the subdirectory 'checklist'
        full_path = os.path.join(self._full_path('checklist'), fname)
        if not os.path.exists(full_path):
            dirname = os.path.dirname(full_path)
            if not os.path.isdir(dirname):
                with tools.ignore(OSError):
                    os.makedirs(dirname)
            open(full_path, 'ab').close()
def _mark_for_gc ( self , fname ) : fname = re . sub ( '[.]' , '' , fname ) . strip ( '/\\' ) # we use a spooldir: add an empty file in the subdirectory 'checklist' full_path = os . path . join ( self . _full_path ( 'checklist' ) , fname ) if not os . path . exists ( full_path ) : dirname = os . path . dirname ( full_path ) if not os . path . isdir ( dirname ) : with tools . ignore ( OSError ) : os . makedirs ( dirname ) open ( full_path , 'ab' ) . close ( )