Files
hasherezade-bearparser/parser/AbstractFileBuffer.cpp
T
2014-08-16 18:50:39 +02:00

23 lines
571 B
C++

#include "AbstractFileBuffer.h"
#include <stdlib.h>
using namespace std;
#ifdef _WINDOWS
char AbstractFileBuffer::PATH_SEPARATOR = WINDOWS_SEPARATOR;
#else
char AbstractFileBuffer::PATH_SEPARATOR = UNIX_SEPARATOR;
#endif
//--------------------------------------------------
bool AbstractFileBuffer::dumpFragment(offset_t offset, bufsize_t size, QString path)
{
BYTE *contentPart = this->getContentAt(offset, size);
if (contentPart == NULL) return false;
ByteBuffer partBuf(contentPart, size);
return ByteBuffer::dumpToFile(path, partBuf);
}