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);
438
	while (getline(infile, line, '\n')) {
438
	while (getline(infile, line, '\n')) {
439
		to.push_back(Utils::String(line).removeChar((char)0));
439
		to.push_back(Utils::String(line).removeChar((char)0));
-
 
440
	}
-
 
441
 
-
 
442
	infile.close();
-
 
443
 
-
 
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));
440
	}
455
	}
441
 
456
 
442
	infile.close();
457
	infile.close();
443
 
458
 
444
	return to.size();
459
	return to.size();