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

Method cwd

Lib/ftplib.py:608–619  ·  view source on GitHub ↗

Change to a directory.

(self, dirname)

Source from the content-addressed store, hash-verified

606 raise error_reply(resp)
607
608 def cwd(self, dirname):
609 '''Change to a directory.'''
610 if dirname == '..':
611 try:
612 return self.voidcmd('CDUP')
613 except error_perm as msg:
614 if msg.args[0][:3] != '500':
615 raise
616 elif dirname == '':
617 dirname = '.' # does nothing, but could return error
618 cmd = 'CWD ' + dirname
619 return self.voidcmd(cmd)
620
621 def size(self, filename):
622 '''Retrieve the size of a file.'''

Callers 4

mainFunction · 0.45
preRunFunction · 0.45
mainFunction · 0.45
_TargetClass · 0.45

Calls 1

voidcmdMethod · 0.95

Tested by

no test coverage detected