nipoppy.utils.fileops

File operations utility functions.

Module Contents

nipoppy.utils.fileops.copy(source, target, dry_run=False, exist_ok=False)

Copy a file or directory.

Raise an error by default if the target path already exists.

Parameters:
nipoppy.utils.fileops.mkdir(dpath, dry_run=False)

Create a directory (including parents).

Do nothing if the directory already exists.

Parameters:

dpath (pathlib.Path)

nipoppy.utils.fileops.movetree(source, target, dry_run=False)

Move directory tree.

Parameters:
nipoppy.utils.fileops.rm(path, dry_run=False)

Remove a file, directory, or symlink.

Parameters:

path (pathlib.Path)

Create a symlink: target -> source.

Parameters:
nipoppy.utils.fileops.logger