Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_files(root, ignore_patterns, verbosity, symlinks=False):
- """
- Helper function to get all files in the given root.
- """
- all_files = []
- for (dirpath, dirnames, filenames) in walk(".", followlinks=symlinks):
- for f in filenames:
- norm_filepath = os.path.normpath(os.path.join(dirpath, f))
- if is_ignored(norm_filepath, ignore_patterns):
- if verbosity > 1:
- sys.stdout.write('ignoring file %s in %s\n' % (f, dirpath))
- else:
- all_files.extend([(dirpath, f)])
- all_files.sort()
- return all_files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement