Initial metadata parsing
This commit is contained in:
parent
ebd41bf4ee
commit
7216fc5ab0
8 changed files with 276 additions and 145 deletions
|
@ -79,6 +79,27 @@ void File::WriteText(const std::string& text)
|
|||
(*mOutHandle) << text;
|
||||
}
|
||||
|
||||
std::vector<std::string> File::readLines()
|
||||
{
|
||||
std::vector<std::string> content;
|
||||
|
||||
if (!PathExists())
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
Open(false);
|
||||
|
||||
std::string str;
|
||||
while(std::getline(*mInHandle, str))
|
||||
{
|
||||
content.push_back(str);
|
||||
}
|
||||
|
||||
Close();
|
||||
return content;
|
||||
}
|
||||
|
||||
std::string File::ReadText()
|
||||
{
|
||||
std::string str((std::istreambuf_iterator<char>(*mInHandle)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue