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

Function S_FileExists

code/client/snd_dma.cpp:3989–3999  ·  view source on GitHub ↗

fixme: need to move this into qcommon sometime?, but too much stuff altered by other people and I won't be able to compile again for ages if I check that out... DO NOT replace this with a call to FS_FileExists, that's for checking about writing out, and doesn't work for this.

Source from the content-addressed store, hash-verified

3987// DO NOT replace this with a call to FS_FileExists, that's for checking about writing out, and doesn't work for this.
3988//
3989qboolean S_FileExists( const char *psFilename )
3990{
3991 fileHandle_t fhTemp;
3992
3993 FS_FOpenFileRead (psFilename, &fhTemp, qtrue); // qtrue so I can fclose the handle without closing a PAK
3994 if (!fhTemp)
3995 return qfalse;
3996
3997 FS_FCloseFile(fhTemp);
3998 return qtrue;
3999}
4000
4001// some stuff for streaming MP3 files from disk (not pleasant, but nothing about MP3 is, other than compression ratios...)
4002//

Callers 4

Music_ParseLeveldataFunction · 0.70
PlayCinematicFunction · 0.70
S_StartBackgroundTrackFunction · 0.70

Calls 2

FS_FOpenFileReadFunction · 0.50
FS_FCloseFileFunction · 0.50

Tested by

no test coverage detected