Guest User

Untitled

a guest
Sep 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @keyword('List Files Recursively')
  2. def list_files_rec_filtered(path, regexp_filter="^(?!.).+$"):
  3. file_list = []
  4. filename_filter = re.compile(regexp_filter)
  5. for root, dirs, files in os.walk(path, topdown=True):
  6. for file in files:
  7. if filename_filter.match(file):
  8. file_list.append(os.path.abspath(os.path.join(root,file)))
  9. return file_list
  10.  
  11. ${files} = file_utils.List Files Recursively ${path} ${FILE_TYPES}
Add Comment
Please, Sign In to add comment