MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / chmod_tree

Function chmod_tree

src/commoncode/fileutils.py:520–529  ·  view source on GitHub ↗

Update permissions recursively in a directory tree `location`.

(location, flags)

Source from the content-addressed store, hash-verified

518
519
520def 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#

Callers 1

chmodFunction · 0.85

Calls 4

walkFunction · 0.85
is_dirMethod · 0.80
chmodFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected