SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
A helper class to handle files. More...
#include <testutils.hpp>
Static Public Member Functions | |
static uint64_t | read_text (const char *file_name, char *&c, bool trunc=0, uint64_t lim=0) |
Read the file with the given file_name. | |
static void | write_text (const char *file_name, const char *c, uint64_t len) |
A helper class to handle files.
static uint64_t sdsl::file::read_text | ( | const char * | file_name, |
char *& | c, | ||
bool | trunc = 0 , |
||
uint64_t | lim = 0 |
||
) | [static] |
Read the file with the given file_name.
file_name | The file name of the text to read. |
c | A char pointer which will point to the text that was read. New memory is allocated for the text. So free c if read_text was successful and c is not needed anymore. |
trunc | Indicated if the file should be truncated. |
lim | Maximal number of bytes which are read when trunc is true. |