src/linux_parser.cpp
string LinuxParser::Kernel() {
  string os, version, kernel;
  string line;
  std::ifstream stream(kProcDirectory + kVersionFilename);
  if (stream.is_open()) {
    std::getline(stream, line);
    std::istringstream linestream(line);  // get string stream of each line and
                                          // " " as delimiter to get each token
    linestream >> os >> version >>
        kernel;  // store the 3rd token in string kernal
  }
  stream.close();
  return kernel;
}
// DONE: An example of how to read data from the filesystem
An example of how to read data from the filesystem
An example of how to read data from the filesystem
string LinuxParser::Kernel() {
  string os, version, kernel;
  string line;
  std::ifstream stream(kProcDirectory + kVersionFilename);
  if (stream.is_open()) {
    std::getline(stream, line);
    std::istringstream linestream(line);  
    linestream >> os >> version >>
        kernel;  
  }
  stream.close();
  return kernel;
}
string LinuxParser :: Kernel ( ) { string os , version , kernel ; string line ; std :: ifstream stream ( kProcDirectory + kVersionFilename ) ; if ( stream . is_open ( ) ) { std :: getline ( stream , line ) ; std :: istringstream linestream ( line ) ; linestream >> os >> version >> kernel ; } stream . close ( ) ; return kernel ; }
DONE: An example of how to read data from the filesystem
DONE : An example of how to read data from the filesystem
// get string stream of each line and // " " as delimiter to get each token // store the 3rd token in string kernal