31 unsigned long getId()
const;
32 std::string
getContent(
const unsigned long int maximumBytes = 1 << 20)
const;
40 std::string
getStringFromFile(
const char* filename,
const unsigned long int maximumBytes = 1 << 20);
41 std::string
getStringFromFile(std::string
const& filename,
const unsigned long int maximumBytes = 1 << 20);
Class to handle file related operations.
std::string getContent(const unsigned long int maximumBytes=1<< 20) const
Get the content of the file limited by maximumBytes.
unsigned long getId() const
unsigned long id
ID of the file.
std::string fileName
Path of the file.
File(unsigned long id, const char *fileName)
const std::string & getFileName() const
fo namespace holds the FOSSology library functions.
std::string getStringFromFile(const char *filename, const unsigned long int maximumBytes)
Reads the content of a file and return it as a string.