bidsbuilder.util.util

checkPath(path, force=False, flag=None)

check path and create folder struct if necessary

inputs: - path: path to check - force: whether to ask the user about potential conflict or force path creation - flag: additional flags for different behaviour levels: -“read” doesn’t matter if the folder doesn’t have write permissions, can still read from the folder (used if you want to load in from a folder) -“write” doesn’t matter if the folder doesn’t have read permissions, can still write to a folder (used if you want to write your data to a folder) returns: - success: whether the path was successfully created/found depending on the flag

Return type:

tuple[bool | str | None]

Parameters:
  • path (str)

  • force (bool)

  • flag (str)

clearSchema(schema, key)
Parameters:
  • schema (MutableMapping)

  • key (str)

isDir(schema, filename)
Return type:

bool

Parameters:
  • schema (MutableMapping)

  • filename (str)

popDict(toPop, Labels, val=None)
Parameters:
  • toPop (dict)

  • Labels (list)

  • val (Any)

popDicts(*args, val=None)
Parameters:

val (Any)