def truncate(self, path, size):
path = self._adjust_cwd(path)<EOL>self._log(DEBUG, '<STR_LIT>' % (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 C{path}.  This usually extends
or shrinks the size of the file, just like the C{truncate()} method on
python file objects.

@param path: path of the file to modify
@type path: str
@param size: the new size of the file
@type size: int or long