code: def truncate(self, size):
          
          self.sftp._log(
              DEBUG, "truncate({}, {!r})".format(hexlify(self.handle), size)
          )
          attr = SFTPAttributes()
          attr.st_size = size
          self.sftp._request(CMD_FSETSTAT, self.handle, attr)
docs: 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