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

Method size

Lib/ftplib.py:621–627  ·  view source on GitHub ↗

Retrieve the size of a file.

(self, filename)

Source from the content-addressed store, hash-verified

619 return self.voidcmd(cmd)
620
621 def size(self, filename):
622 '''Retrieve the size of a file.'''
623 # The SIZE command is defined in RFC-3659
624 resp = self.sendcmd('SIZE ' + filename)
625 if resp[:3] == '213':
626 s = resp[3:].strip()
627 return int(s)
628
629 def mkd(self, dirname):
630 '''Make a directory, return its full pathname.'''

Callers

nothing calls this directly

Calls 2

sendcmdMethod · 0.95
stripMethod · 0.45

Tested by

no test coverage detected