This repository has been archived on 2026-04-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
original-mcpe-0.6.1/handheld/project/lib_projects/raknet/jni/RaknetSources/IncrementalReadInterface.cpp
2026-04-01 23:13:15 +02:00

16 lines
511 B
C++

#include "IncrementalReadInterface.h"
#include <stdio.h>
using namespace RakNet;
unsigned int IncrementalReadInterface::GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context)
{
FILE *fp = fopen(filename, "rb");
if (fp==0)
return 0;
fseek(fp,startReadBytes,SEEK_SET);
unsigned int numRead = (unsigned int) fread(preallocatedDestination,1,numBytesToRead, fp);
fclose(fp);
return numRead;
}