engine/EngineCommon.c
/*	The filename will be prefixed by the current game directory.
*/
The filename will be prefixed by the current game directory.
The filename will be prefixed by the current game directory .
void FileSystem_WriteFile(const char *ccFileName,void *data,int len)
{
	int		handle;
	char    name[PLATFORM_MAX_PATH];
	if (!plCreateDirectory(com_gamedir)) 
		Sys_Error("Failed to create directory!\n");
	sprintf (name,"%s/%s",com_gamedir,ccFileName);
	handle = Sys_FileOpenWrite (name);
	if (handle == -1)
	{
		Sys_Printf ("COM_WriteFile: failed on %s\n", name);
		return;
	}
	Sys_Printf ("COM_WriteFile: %s\n", name);
	Sys_FileWrite (handle, data, len);
	Sys_FileClose (handle);
}
void FileSystem_WriteFile ( const char * ccFileName , void * data , int len ) { int handle ; char name [ PLATFORM_MAX_PATH ] ; if ( ! plCreateDirectory ( com_gamedir ) ) Sys_Error ( " \n " ) ; sprintf ( name , " " , com_gamedir , ccFileName ) ; handle = Sys_FileOpenWrite ( name ) ; if ( handle == -1 ) { Sys_Printf ( " \n " , name ) ; return ; } Sys_Printf ( " \n " , name ) ; Sys_FileWrite ( handle , data , len ) ; Sys_FileClose ( handle ) ; }
The filename will be prefixed by the current game directory.
The filename will be prefixed by the current game directory .
//johnfitz -- if we've switched to a nonexistant gamedir, create it now so we don't crash