#include "config_package.h" config_package::config_package(std::string name) : name(name){ this->file = std::fstream("/etc/portage/package.use/"+name, std::ifstream::in); for(std::string line; std::getline(this->file, line);){ this->uses+=line+"\n"; } this->file.close(); } void config_package::change_uses(std::string remote_uses){ if(remote_uses!=this->uses){ this->file=std::fstream("/etc/portage/package.use/"+name, std::ofstream::out); this->file << remote_uses; this->file.close(); } }