def input_dir(self, dirname):
dirname = dirname.rstrip('<STR_LIT:/>')<EOL>if self.excluded(dirname):<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>counters = self.options.report.counters<EOL>verbose = self.options.verbose<EOL>filepatterns = self.options.filename<EOL>runner = self.runner<EOL>for root, dirs, files in os.walk(dirname):<EOL><INDENT>if verbose:<EOL><INDENT>print('<STR_LIT>' + root)<EOL><DEDENT>counters['<STR_LIT>'] += <NUM_LIT:1><EOL>for subdir in sorted(dirs):<EOL><INDENT>if self.excluded(subdir, root):<EOL><INDENT>dirs.remove(subdir)<EOL><DEDENT><DEDENT>for filename in sorted(files):<EOL><INDENT>if ((filename_match(filename, filepatterns) and<EOL>not self.excluded(filename, root))):<EOL><INDENT>runner(os.path.join(root, filename))<EOL><DEDENT><DEDENT><DEDENT>
Check all files in this directory and all subdirectories.