Subversion Repositories spk

Rev

Rev 52 | Rev 56 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52 Rev 53
Line 111... Line 111...
111
bool CFileIO::read(unsigned char *buf, size_t iSize, bool bEndChar)
111
bool CFileIO::read(unsigned char *buf, size_t iSize, bool bEndChar)
112
{
112
{
113
	if ( !this->isOpened() ) startRead();
113
	if ( !this->isOpened() ) startRead();
114
	if ( !this->isOpened() ) return false;
114
	if ( !this->isOpened() ) return false;
115
 
115
 
-
 
116
	if ( iSize > m_lSize ) iSize = m_lSize;
116
	try {
117
	try {
117
		m_fId.read((char *)buf, iSize);
118
		m_fId.read((char *)buf, iSize);
118
	}
119
	}
119
	catch (std::exception &e) {
120
	catch (std::exception &e) {
120
		CLog::logf(CLog::Log_IO, 3, "ERROR: CFileIO::read() unable to read from file: %s (%s)", m_sFilename.c_str(), e.what());
121
		CLog::logf(CLog::Log_IO, 3, "ERROR: CFileIO::read() unable to read from file: %s (%s)", m_sFilename.c_str(), e.what());
Line 561... Line 562...
561
void CFileIO::seek(unsigned int iPos)
562
void CFileIO::seek(unsigned int iPos)
562
{
563
{
563
	_seek(iPos, std::ios::cur);
564
	_seek(iPos, std::ios::cur);
564
}
565
}
565
 
566
 
566
void CFileIO::seekEnd()
567
void CFileIO::seekEnd(unsigned int iPos)
567
{
568
{
568
	_seek(0, std::ios::end);
569
	_seek(iPos, std::ios::end);
569
}
570
}
570
 
571
 
571
void CFileIO::seekStart(unsigned int iPos)
572
void CFileIO::seekStart(unsigned int iPos)
572
{
573
{
573
	_seek(iPos, std::ios::beg);
574
	_seek(iPos, std::ios::beg);