MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / cwd

Method cwd

tools/python-3.11.9-amd64/Lib/ftplib.py:614–625  ·  view source on GitHub ↗

Change to a directory.

(self, dirname)

Source from the content-addressed store, hash-verified

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

Callers 2

initMethod · 0.45
retrfileMethod · 0.45

Calls 1

voidcmdMethod · 0.95

Tested by

no test coverage detected