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