hscommon.conflict — dupeGuru 4.0.4 documentation

# dupeGuru 4.0.4 documentation

## hscommon.conflict

When you have to deal with names that have to be unique and can conflict together, you can use this module that deals with conflicts by prepending unique numbers in `[]` brackets to the name.

`hscommon.conflict.` `get_conflicted_name`(other_names, name)

  Returns name with a `[000]` number in front of it.

  The number between brackets depends on how many conlicted filenames there already are in other_names.

`hscommon.conflict.` `get_unconflicted_name`(name)

  Returns `name` without `[]` brackets.

  Brackets which, of course, might have been added by func:get_conflicted_name.

`hscommon.conflict.` `is_conflicted`(name)

  Returns whether `name` is prepended with a bracketed number.

`hscommon.conflict.` `smart_copy`(source_path, dest_path)

  Copies `source_path` to `dest_path`, recursively and with conflict resolution.

`hscommon.conflict.` `smart_move`(source_path, dest_path)

  Same as `smart_copy()`, but it moves files instead.