engine/EngineCommon.c
/*	Copies a file over from the net to the local cache, creating any directories
	needed.  This is for the convenience of developers using ISDN from home.
*/
Copies a file over from the net to the local cache, creating any directories
needed.  This is for the convenience of developers using ISDN from home.
Copies a file over from the net to the local cache creating any directories needed . This is for the convenience of developers using ISDN from home .
void FileSystem_CopyFile(char *netpath,char *cachepath)
{
	int             in, out;
	int             remaining, count;
	char    buf[4096];
	remaining = Sys_FileOpenRead (netpath, &in);
	FileSystem_CreatePath(cachepath);     
	out = Sys_FileOpenWrite (cachepath);
	while (remaining)
	{
		if (remaining < sizeof(buf))
			count = remaining;
		else
			count = sizeof(buf);
		Sys_FileRead (in, buf, count);
		Sys_FileWrite (out, buf, count);
		remaining -= count;
	}
	Sys_FileClose(in);
	Sys_FileClose(out);
}
void FileSystem_CopyFile ( char * netpath , char * cachepath ) { int in , out ; int remaining , count ; char buf [ 4096 ] ; remaining = Sys_FileOpenRead ( netpath , & in ) ; FileSystem_CreatePath ( cachepath ) ; out = Sys_FileOpenWrite ( cachepath ) ; while ( remaining ) { if ( remaining < sizeof ( buf ) ) count = remaining ; else count = sizeof ( buf ) ; Sys_FileRead ( in , buf , count ) ; Sys_FileWrite ( out , buf , count ) ; remaining -= count ; } Sys_FileClose ( in ) ; Sys_FileClose ( out ) ; }
Copies a file over from the net to the local cache, creating any directories
needed.
Copies a file over from the net to the local cache creating any directories needed .
// create directories up to the cache file