def truncate(self, size):
self.sftp._log(<EOL>DEBUG, "<STR_LIT>".format(hexlify(self.handle), size)<EOL>)<EOL>attr = SFTPAttributes()<EOL>attr.st_size = size<EOL>self.sftp._request(CMD_FSETSTAT, self.handle, attr)<EOL>
Change the size of this file.  This usually extends
or shrinks the size of the file, just like the ``truncate()`` method on
Python file objects.

:param size: the new size of the file