def truncate(self, path, size):
path = self._adjust_cwd(path)<EOL>self._log(DEBUG, "<STR_LIT>".format(path, size))<EOL>attr = SFTPAttributes()<EOL>attr.st_size = size<EOL>self._request(CMD_SETSTAT, path, attr)<EOL>
Change the size of the file specified by ``path``.  This usually
extends or shrinks the size of the file, just like the `~file.truncate`
method on Python file objects.

:param str path: path of the file to modify
:param int size: the new size of the file