fyda.DataBank.root_to_dict¶
-
DataBank.
root_to_dict
(root, auto_deposit=True, error='raise')[source]¶ Recursively convert root folder to native Python dictionary.
Parameters: - root (str or path-like) – Path to root folder.
- auto_deposit (bool) – If True, automatically call
DataBank.deposit()
on any files found through the recursion to theshortcuts
dict. - error (str, {'raise', 'ignore'}) – Whether to ignore filetype errors or raise a
NotImplementedError
.
Notes
Modified from `this`<https://btmiller.com/2015/03/17/represent-file-structure-as-yaml-with-python.html>_ example by Blake Miller.