alf.folders¶
Functions
Returns all sessions found in all subfolders of a main data folder |
|
Returns all subject folders found from a main data folder |
|
Returns all subject names found from a main data folder |
|
Return the next number for a session given a session_date_folder |
|
Will iteratively remove any children empty folders |
|
Returns the session name (subject/date/number) string for any filepath useing session_path |
|
Returns the session path from any filepath if the date/number pattern is found |
|
Given a root_data_folder will try to find a ‘Subjects’ data folder. |
-
subjects_data_folder
(folder: pathlib.Path, rglob: bool = False) → pathlib.Path[source]¶ Given a root_data_folder will try to find a ‘Subjects’ data folder. If Subjects folder is passed will return it directly.
-
remove_empty_folders
(folder: Union[str, pathlib.Path]) → None[source]¶ Will iteratively remove any children empty folders
-
find_sessions
(folder: Union[str, pathlib.Path]) → List[str][source]¶ Returns all sessions found in all subfolders of a main data folder
-
find_subject_names
(folder: Union[str, pathlib.Path]) → List[str][source]¶ Returns all subject names found from a main data folder
-
session_path
(path: Union[str, pathlib.Path]) → str[source]¶ Returns the session path from any filepath if the date/number pattern is found
-
session_name
(path: Union[str, pathlib.Path]) → str[source]¶ Returns the session name (subject/date/number) string for any filepath useing session_path
-
next_num_folder
(session_date_folder: str) → str[source]¶ Return the next number for a session given a session_date_folder