mne_bids.print_dir_tree

mne_bids.print_dir_tree(folder, max_depth=None, return_str=False)[source]

Recursively print a directory tree.

Parameters
folderstr | pathlib.Path

The folder for which to print the directory tree.

max_depthint

The maximum depth into which to descend recursively for printing the directory tree.

return_strbool

If True, return the directory tree as a str instead of printing it.

Returns
str | None

If return_str is True, the directory tree is returned as a str. Else, None is returned and the directory tree is printed.

Examples using mne_bids.print_dir_tree