Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato
Membri pubblici | Elenco di tutti i membri
Riferimenti per la classe radarelab::File

Open a file taking its name from a given env variable. Continua...

#include <utils.h>

Membri pubblici

bool open_from_env (const char *varname, const char *mode, const char *desc=nullptr)
 Opens a file taking its name from the environment variable envname.
 
bool open (const std::string &fname, const char *mode, const char *desc=nullptr)
 Opens a file by its pathname.
 
 operator FILE * ()
 Allows FILEFromEnv objects to be used as FILE pointers.
 
 operator bool () const
 Allows FILEFromEnv to be used in an if (...) to check if the file is open.
 
bool fread (void *buf, size_t size)
 Performs a fread on the file, throwing an exception if anything goes wrong.
 
void read_lines (std::function< void(char *, size_t)> line_cb)
 Read the file line by line, calling line_cb on each line read.
 

Descrizione dettagliata

Open a file taking its name from a given env variable.

If the variable is not set, assume a 'false' value.

Definizione alla linea 21 del file utils.h.


La documentazione per questa classe รจ stata generata a partire dai seguenti file: