microflo/linux.hpp
// PERFORMANCE: string-functions and file open/close for each I/O call. Consider capturing state in a class
string-functions and file open/close for each I/O call. Consider capturing state in a class
string - functions and file open / close for each I / O call . Consider capturing state in a class
std::string read_sys_file(const std::string &path) {
        std::ifstream fs(path.c_str());
        if (!fs){
            return "";
        }
        std::string res;
        fs >> res; 
        fs.close();
        return res;
    }
std :: string read_sys_file ( const std :: string & path ) { std :: ifstream fs ( path . c_str ( ) ) ; if ( ! fs ) { return " " ; } std :: string res ; fs >> res ; fs . close ( ) ; return res ; }
PERFORMANCE: string-functions and file open/close for each I/O call.
PERFORMANCE : string - functions and file open / close for each I / O call .