Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.interfaces.movedir

brainprep.interfaces.movedir(source_dir, output_dir, content=False, copy=False, add_source_basename=True, dryrun=False)[source]

Move input directory.

Parameters:
source_dirDirectory

Path to the directory to be moved.

output_dirDirectory

Directory where the folder is moved.

contentbool

If True, move the content of the source directory. Default False.

copybool

If True, copy the content of the source directory. Default False.

add_source_basenamebool

If True, add the source directory basename to output directory. Only valid when content is False. Default True.

dryrunbool

If True, skip actual computation and file writing. Default False.

Returns:
target_directoryDirectory

Path to the moved directory.

Raises:
ValueError

If source_dir is not a directory.