40 #define FILEBUFFER_SIZE (8192-8)
41 #define FILEBUFFER_TOLERANCE 4096
169 int pos =
pFile->Tell();
197 int len =
pFile->GetLength();
253 int sz =
pFile->Write(psourceBuffer,numBytes);
265 int sz =
pFile->Write(psourceBuffer,numBytes);
286 numBytes -= readBytes;
287 pdestBuffer += readBytes;
294 numBytes =
pFile->Read(pdestBuffer,numBytes);
300 return readBytes + ((numBytes==-1) ? 0 : numBytes);
311 return numBytes + readBytes;
337 int sz =
pFile->Read(pdestBuffer,numBytes);
346 int skippedBytes = 0;
353 numBytes -= skippedBytes;
358 numBytes =
pFile->SkipBytes(numBytes);
362 skippedBytes += numBytes;
366 else if (skippedBytes <= 0)
374 int available =
pFile->BytesAvailable();
395 return pFile->Flush();
474 Pos += (unsigned)offset;
531 int szRequest, szRead, szWritten;
535 szRequest = (byteSize > int(
sizeof(buff))) ?
int(
sizeof(buff)) : byteSize;
537 szRead = pstream->
Read(buff,szRequest);
540 szWritten =
Write(buff,szRead);
544 if (szWritten < szRequest)
565 return pFile->Close();
575 for (
UPInt i=len; i>0; i--)
576 if (purl[i]==
'\\' || purl[i]==
'/')
virtual int BytesAvailable()
BufferModeType BufferMode
bool SetBufferMode(BufferModeType mode)
virtual int CopyFromStream(File *pstream, int byteSize)
__BEGIN_NAMESPACE_STD void * memcpy(void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull((1
virtual int Write(const UByte *pbufer, int numBytes)
#define FILEBUFFER_TOLERANCE
const char *OVR_CDECL GetShortFilename(const char *purl)
virtual int SkipBytes(int numBytes)
virtual SInt64 LSeek(SInt64 offset, int origin=Seek_Set)
virtual int Read(UByte *pbufer, int numBytes)=0
UPInt OVR_CDECL OVR_strlen(const char *str)
virtual int Seek(int offset, int origin=Seek_Set)
virtual int Read(UByte *pbufer, int numBytes)
virtual SInt64 LGetLength()