def resize_file(self, share_name, directory_name, <EOL>file_name, content_length, timeout=None):
_validate_not_none('<STR_LIT>', share_name)<EOL>_validate_not_none('<STR_LIT>', file_name)<EOL>_validate_not_none('<STR_LIT>', content_length)<EOL>request = HTTPRequest()<EOL>request.method = '<STR_LIT>'<EOL>request.host = self._get_host()<EOL>request.path = _get_path(share_name, directory_name, file_name)<EOL>request.query = [<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', _int_to_str(timeout)),<EOL>]<EOL>request.headers = [<EOL>('<STR_LIT>', _to_str(content_length))]<EOL>self._perform_request(request)<EOL>
Resizes a file to the specified size. If the specified byte
value is less than the current size of the file, then all
ranges above the specified byte value are cleared.

:param str share_name:
    Name of existing share.
:param str directory_name:
    The path to the directory.
:param str file_name:
    Name of existing file.
:param int content_length:
    The length to resize the file to.
:param int timeout:
    The timeout parameter is expressed in seconds.