MCPcopy Index your code
hub / github.com/python/cpython / rename

Method rename

Lib/ftplib.py:593–598  ·  view source on GitHub ↗

Rename a file.

(self, fromname, toname)

Source from the content-addressed store, hash-verified

591 yield (name, entry)
592
593 def rename(self, fromname, toname):
594 '''Rename a file.'''
595 resp = self.sendcmd('RNFR ' + fromname)
596 if resp[0] != '3':
597 raise error_reply(resp)
598 return self.voidcmd('RNTO ' + toname)
599
600 def delete(self, filename):
601 '''Delete a file.'''

Callers 13

prepFunction · 0.45
moveFunction · 0.45
_readlineMethod · 0.45
addMethod · 0.45
__setitem__Method · 0.45
set_infoMethod · 0.45
flushMethod · 0.45
packMethod · 0.45
_lock_fileFunction · 0.45
processFunction · 0.45
openFunction · 0.45
closeFunction · 0.45

Calls 3

sendcmdMethod · 0.95
voidcmdMethod · 0.95
error_replyClass · 0.85

Tested by

no test coverage detected