Files

sekupy.utils.files.add_subdirs(path, name, sub_dirs)[source]

Add subdirectories to build complete directory paths.

This function creates a list of complete directory paths by combining a base path, subject name, and subdirectories. It validates that directories exist before adding them to the list.

Parameters:
  • path (str) – Base directory path

  • name (str) – Subject or experiment name

  • sub_dirs (list) – List of subdirectory names to add

Returns:

List of complete directory paths that exist

Return type:

list

sekupy.utils.files.build_pathnames(path, name, sub_dirs)[source]

Build list of file pathnames from directories.

This function creates a comprehensive list of file paths by searching through the base directory and specified subdirectories.

Parameters:
  • path (str) – Base directory path

  • name (str) – Subject or experiment name

  • sub_dirs (list) – List of subdirectory names to search

Returns:

List of file paths found in the directories

Return type:

list

sekupy.utils.files.make_dir(path)[source]

Create directory using mkdir -p command.

This function wraps the Unix mkdir -p command to create directories recursively if they don’t exist.

Parameters:

path (str) – Directory path to create