SetEndOfFile function kernel32
Sets the physical file size for the specified file to the current position of the file pointer.
To learn more, see learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-setendoffile.
Implementation
Win32Result<bool> SetEndOfFile(HANDLE hFile) {
resolveGetLastError();
final result_ = _SetEndOfFile(hFile);
return .new(value: result_ != FALSE, error: GetLastError());
}