all_files_list = []
for root, dirs, files in os.walk(root_dir):
for file in files:
all_files_list.append(os.path.join(root, file))
pkg_file_list = []
all_file_generator = os.scandir(root_dir)
for p in all_file_generator:
pkg_file_list.append(p.path)