'Ensure that all importables in this dir have been scanned
into the db at least once.'

def ensure_all_dirs_scanned(self, ctlr=None):

    dirs = frozenset(filter((lambda d: (d not in self._have_ensured_scanned_from_dir_cache)), self.dirs))
    if (not dirs):
        log.debug('Skipping    scanning    dirs    %r    -    all    scanned', self.dirs)
        return
    reporter = self.lang_zone.db.event_reporter
    if (reporter and hasattr(reporter, 'onScanStarted')):
        msg = ('Scanning    %r    directories' % (len(dirs),))
        if (len(dirs) == 1):
            msg = 'Scanning    one    directory'
        reporter.onScanStarted(msg, dirs)
    log.debug('ensure_all_dirs_scanned:    scanning    %r    directories', len(dirs))
    scanned = set()
    try:
        for dir in dirs:
            if ctlr:
                if ctlr.is_aborted():
                    log.debug('ctlr    aborted')
                    break
            try:
                if (reporter and hasattr(reporter, 'onScanDirectory')):
                    reporter.onScanDirectory(("Scanning    %s    files    in    '%s'" % (self.lang, dir)), dir, len(scanned), len(dirs))
            except:
                pass
            self.ensure_dir_scanned(dir, ctlr=ctlr, reporter=(lambda msg: None))
            scanned.add(dir)
    finally:
        log.debug('ensure_all_dirs_scanned:    finished    scanning    %r/%r    dirs', len(scanned), len(dirs))
        if (reporter and hasattr(reporter, 'onScanComplete')):
            reporter.onScanComplete(dirs, scanned)
