MCPcopy Create free account
hub / github.com/audeering/opensmile / loadFile

Method loadFile

src/core/configManager.cpp:1701–1716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1699}
1700
1701void cConfigFileBuffer::loadFile(const char *filename, FILE *f) {
1702 std::ifstream is;
1703 is = std::ifstream(filename, std::ifstream::in);
1704 if (is) {
1705 // get length of file:
1706 is.seekg(0, is.end);
1707 size_ = is.tellg();
1708 sizeAllocated_ = size_;
1709 is.seekg(0, is.beg);
1710 if (buffer_ != NULL)
1711 free(buffer_);
1712 buffer_ = (char *)calloc(1, sizeof(char) * sizeAllocated_);
1713 is.read(buffer_, size_);
1714 is.close();
1715 }
1716}
1717
1718char * cFileConfigReader::loadFileIntoCache(const char *filename,
1719 /*FILE *f,*/ int *bufSize) {

Callers 1

loadFileIntoCacheMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected