Update permissions recursively in a directory tree `location`.
(location, flags)
| 518 | |
| 519 | |
| 520 | def chmod_tree(location, flags): |
| 521 | """ |
| 522 | Update permissions recursively in a directory tree `location`. |
| 523 | """ |
| 524 | if filetype.is_dir(location): |
| 525 | for top, dirs, files in walk(location): |
| 526 | for d in dirs: |
| 527 | chmod(os.path.join(top, d), flags, recurse=False) |
| 528 | for f in files: |
| 529 | chmod(os.path.join(top, f), flags, recurse=False) |
| 530 | |
| 531 | |
| 532 | # |