MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / FileStream_Write

Function FileStream_Write

src/External/CascLib/src/common/FileStream.cpp:2636–2646  ·  view source on GitHub ↗

* This function writes data to the stream * * - Returns true if the write operation succeeded and all bytes have been written * - Returns false if either write failed or not all bytes have been written * - If the pByteOffset is NULL, the function must write the data to the current file position * * \a pStream Pointer to an open stream * \a pByteOffset Pointer to file byte offset. If NULL, i

Source from the content-addressed store, hash-verified

2634 * \a dwBytesToWrite Number of bytes to write to the file
2635 */
2636bool FileStream_Write(TFileStream * pStream, ULONGLONG * pByteOffset, const void * pvBuffer, DWORD dwBytesToWrite)
2637{
2638 if(pStream->dwFlags & STREAM_FLAG_READ_ONLY)
2639 {
2640 SetCascError(ERROR_ACCESS_DENIED);
2641 return false;
2642 }
2643
2644 assert(pStream->StreamWrite != NULL);
2645 return pStream->StreamWrite(pStream, pByteOffset, pvBuffer, dwBytesToWrite);
2646}
2647
2648/**
2649 * Returns the size of a file

Callers 2

Storage_SeekFilesFunction · 0.85
SaveLocalFileFunction · 0.85

Calls 1

SetCascErrorFunction · 0.85

Tested by 1

Storage_SeekFilesFunction · 0.68