fsl.utils.imcp

This module contains functions for moving/copying NIFIT image files.

imcp Copy the given src file to destination dest.
immv Move the specified src to the specified dest.
fsl.utils.imcp.imcp(src, dest, overwrite=False, useDefaultExt=False, move=False)

Copy the given src file to destination dest.

A fsl.utils.path.PathError is raised if anything goes wrong.

Parameters:
  • src – Path to copy. If allowedExts is provided, the file extension can be omitted.
  • dest – Destination path. Can be an incomplete file specification (i.e. without the extension), or a directory.
  • overwrite – If True this function will overwrite files that already exist. Defaults to False.
  • useDefaultExt – Defaults to False. If True, the destination file type will be set according to the default extension, specified by defaultExt(). If the source file does not have the same type as the default extension, it will be converted. If False, the source file type is not changed.
  • move – If True, the files are moved, instead of being copied. See immv().
fsl.utils.imcp.immv(src, dest, overwrite=False, useDefaultExt=False)

Move the specified src to the specified dest. See imcp().