MCPcopy Create free account
hub / github.com/diasurgical/devilution / FileStream_SetSize

Function FileStream_SetSize

3rdParty/StormLib/src/FileStream.cpp:2722–2732  ·  view source on GitHub ↗

* Sets the size of a file * * \a pStream Pointer to an open stream * \a NewFileSize File size to set */

Source from the content-addressed store, hash-verified

2720 * \a NewFileSize File size to set
2721 */
2722bool FileStream_SetSize(TFileStream * pStream, ULONGLONG NewFileSize)
2723{
2724 if(pStream->dwFlags & STREAM_FLAG_READ_ONLY)
2725 {
2726 SetLastError(ERROR_ACCESS_DENIED);
2727 return false;
2728 }
2729
2730 assert(pStream->StreamResize != NULL);
2731 return pStream->StreamResize(pStream, NewFileSize);
2732}
2733
2734/**
2735 * This function returns the current file position

Callers 1

SaveMPQTablesFunction · 0.85

Calls 1

SetLastErrorFunction · 0.85

Tested by

no test coverage detected