* Sets the size of a file * * \a pStream Pointer to an open stream * \a NewFileSize File size to set */
| 2720 | * \a NewFileSize File size to set |
| 2721 | */ |
| 2722 | bool 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 |
no test coverage detected