'Moves or copies the item\'s file, updating the path value if
the move succeeds. If a file exists at ``dest``, then it is
slightly modified to be unique.'

def move_file(self, dest, copy=False, link=False, hardlink=False):

    if (not util.samefile(self.path, dest)):
        dest = util.unique_path(dest)
    if copy:
        util.copy(self.path, dest)
        plugins.send('item_copied', item=self, source=self.path, destination=dest)
    elif link:
        util.link(self.path, dest)
        plugins.send('item_linked', item=self, source=self.path, destination=dest)
    elif hardlink:
        util.hardlink(self.path, dest)
        plugins.send('item_hardlinked', item=self, source=self.path, destination=dest)
    else:
        plugins.send('before_item_moved', item=self, source=self.path, destination=dest)
        util.move(self.path, dest)
        plugins.send('item_moved', item=self, source=self.path, destination=dest)
    self.path = dest
