Subversion Repositories spk

Rev

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

Rev 166 Rev 170
Line 427... Line 427...
427
 
427
 
428
	infile.close();
428
	infile.close();
429
 
429
 
430
	return file;
430
	return file;
431
}
431
}
432
size_t CFileIO::readLines(std::vector<Utils::String> &to) const
432
size_t CFileIO::readLines(std::vector<Utils::String>& to) const
433
{
433
{
434
	if (_sFilename.empty()) return 0;
434
	if (_sFilename.empty()) return 0;
435
 
435
 
436
	Utils::String line;
436
	Utils::String line;
437
	std::ifstream infile(_sFilename.c_str(), std::ios_base::in);
437
	std::ifstream infile(_sFilename.c_str(), std::ios_base::in);
Line 440... Line 440...
440
	}
440
	}
441
 
441
 
442
	infile.close();
442
	infile.close();
443
 
443
 
444
	return to.size();
444
	return to.size();
-
 
445
}
-
 
446
 
-
 
447
size_t CFileIO::readLines(Utils::CStringList& to) const
-
 
448
{
-
 
449
	if (_sFilename.empty()) return 0;
-
 
450
 
-
 
451
	Utils::String line;
-
 
452
	std::ifstream infile(_sFilename.c_str(), std::ios_base::in);
-
 
453
	while (getline(infile, line, '\n')) {
-
 
454
		to.pushBack(Utils::String(line).removeChar((char)0));
-
 
455
	}
-
 
456
 
-
 
457
	infile.close();
-
 
458
 
-
 
459
	return to.size();
445
}
460
}
446
 
461
 
447
 
462
 
448
CyStringList *CFileIO::ReadLinesStr()
463
CyStringList *CFileIO::ReadLinesStr()
449
{
464
{