MCPcopy Create free account
hub / github.com/JACoders/OpenJK / FS_WriteFile

Function FS_WriteFile

code/qcommon/files.cpp:1826–1844  ·  view source on GitHub ↗

============ FS_WriteFile Filename are reletive to the quake search path ============ */

Source from the content-addressed store, hash-verified

1824============
1825*/
1826void FS_WriteFile( const char *qpath, const void *buffer, int size ) {
1827 fileHandle_t f;
1828
1829 FS_AssertInitialised();
1830
1831 if ( !qpath || !buffer ) {
1832 Com_Error( ERR_FATAL, "FS_WriteFile: NULL parameter" );
1833 }
1834
1835 f = FS_FOpenFileWrite( qpath );
1836 if ( !f ) {
1837 Com_Printf( "Failed to open %s\n", qpath );
1838 return;
1839 }
1840
1841 FS_Write( buffer, size, f );
1842
1843 FS_FCloseFile( f );
1844}
1845
1846/*
1847==========================================================================

Callers

nothing calls this directly

Calls 6

FS_AssertInitialisedFunction · 0.70
Com_ErrorFunction · 0.70
FS_FOpenFileWriteFunction · 0.70
Com_PrintfFunction · 0.70
FS_WriteFunction · 0.70
FS_FCloseFileFunction · 0.70

Tested by

no test coverage detected