Retrieve the size of a file.
(self, filename)
| 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.''' |