osl_ephys.utils.file_handling#
File handling utility functions.
Attributes#
Functions#
|
Process inputs for several cases |
|
Remove leading/trailing whitespace, tab, newline and carriage return |
|
|
|
|
|
Checks if an output directory exists and if not creates it. |
|
Gets the raw data directory from filename(s). |
|
Add sub-directory. |
|
Module Contents#
- osl_ephys.utils.file_handling.process_file_inputs(inputs)[source]#
Process inputs for several cases
The argument, inputs, can be… 1) string path to unicode file 2) string path to dir (e.g. if CTF .ds dir) 3) string path to file or regular-expression matching files 4) list of string paths to files 5) list of string paths to dirs (e.g. if CTF .ds dirs) 6) list of tuples with path to file and output name pairs 7) list of MNE objects
- osl_ephys.utils.file_handling.sanitise_filepath(fname)[source]#
Remove leading/trailing whitespace, tab, newline and carriage return characters.
- osl_ephys.utils.file_handling.validate_outdir(outdir)[source]#
Checks if an output directory exists and if not creates it.