Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. def r(path):
  2. for dir_file in path.iterdir():
  3. if dir_file.is_file():
  4. file_list.append(os.path.abspath(dir_file))
  5. else:
  6. if dir_file.is_dir():
  7. sub_list.append(dir_file)
  8. sub_list.extend(r(dir_file))
  9.  
  10.  
  11. file_list.sort()
  12. return file_list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement