'Helper method to get all files in the given root.'

def find_files(self, root):

    def is_ignored(path, ignore_patterns):
        '\n                                                Check    if    the    given    path    should    be    ignored    or    not.\n                                                '
        filename = os.path.basename(path)
        ignore = (lambda pattern: fnmatch.fnmatchcase(filename, pattern))
        return any((ignore(pattern) for pattern in ignore_patterns))
    dir_suffix = ('%s*' % os.sep)
    norm_patterns = [(p[:(- len(dir_suffix))] if p.endswith(dir_suffix) else p) for p in self.ignore_patterns]
    all_files = []
    for (dirpath, dirnames, filenames) in os.walk(root, topdown=True, followlinks=self.symlinks):
        for dirname in dirnames[:]:
            if is_ignored(os.path.normpath(os.path.join(dirpath, dirname)), norm_patterns):
                dirnames.remove(dirname)
                if (self.verbosity > 1):
                    self.stdout.write(('ignoring    directory    %s\n' % dirname))
        for filename in filenames:
            if is_ignored(os.path.normpath(os.path.join(dirpath, filename)), self.ignore_patterns):
                if (self.verbosity > 1):
                    self.stdout.write(('ignoring    file    %s    in    %s\n' % (filename, dirpath)))
            else:
                all_files.append(TranslatableFile(dirpath, filename))
    return sorted(all_files)
