fsl.utils.filetree.parse
¶
-
fsl.utils.filetree.parse.
extra_tree_dirs
(extra_dirs)[source]¶ Temporarily insert
extra_dirs
to the beginning oftree_directories
.Parameters: extra_dirs – Sequence of additional tree file directories to search.
-
fsl.utils.filetree.parse.
search_tree
(name: str) → str[source]¶ Searches for the file defining the specific tree
Iteratively searches through the directories in
tree_directories
till a file named ${name}.tree is foundParameters: name – Name of the tree Returns: path to the file defining the tree
-
fsl.utils.filetree.parse.
list_all_trees
() → List[str][source]¶ Return a list containing paths to all tree files that can be found in
tree_directories
-
fsl.utils.filetree.parse.
check_forbidden_characters
(text, characters, text_type)[source]¶ Checks the text for forbidden characters
raises ValueError if one is found
Parameters: - text – string with the text
- characters – sequence of forbidden characters
- text_type – type of the text to raise in error message