205
205
:param unlink_func: A way to delete the target file if the full rename
208
209
# sftp rename doesn't allow overwriting, so play tricks:
209
210
base = os.path.basename(new)
210
211
dirname = os.path.dirname(new)
216
214
tmp_name = pathjoin(dirname, tmp_name)
218
216
# Rename the file out of the way, but keep track if it didn't exist