Logo Search packages:      
Sourcecode: hardlink version File versions

def hardlink::HardLink::get_files (   self  ) 

Return a dict like {'directory': [File(...)]}

Definition at line 191 of file hardlink.py.

00191                        :
        '''Return a dict like {'directory': [File(...)]}'''
        retfiles = defaultdict(list)
        for top in self._dirs:
            for root, _, files in os.walk(top):
                for fname in files:
                    fpath = os.path.join(root, fname)
                    exc = any(pat.search(fpath) for pat in self.opts.exclude)
                    inc = any(pat.search(fpath) for pat in self.opts.include)
                    if ((self.opts.exclude and exc and not inc) or
                        (self.opts.include and not inc)):
                        mfile = File(fpath, self.opts, self)
                        if mfile.isreg:
                        del mfile
                    except OSError, err:
                        print 'OSError:', err
        return retfiles

def format(bytes):

Generated by  Doxygen 1.6.0   Back to index