MCPcopy Create free account
hub / github.com/Gregwar/fatcat / FatSystem

Method FatSystem

src/core/FatSystem.cpp:28–50  ·  view source on GitHub ↗

* Opens the FAT resource */

Source from the content-addressed store, hash-verified

26 * Opens the FAT resource
27 */
28FatSystem::FatSystem(string filename_, unsigned long long globalOffset_, OutputFormatType outputFormat_)
29 : strange(0),
30 filename(filename_),
31 globalOffset(globalOffset_),
32 totalSize(-1),
33 listDeleted(false),
34 statsComputed(false),
35 freeClusters(0),
36 cacheEnabled(false),
37 type(FAT32),
38 rootEntries(0)
39{
40 this->_outputFormat = outputFormat_;
41 fd = open(filename.c_str(), O_RDONLY|O_LARGEFILE);
42 writeMode = false;
43
44 if (fd < 0) {
45 ostringstream oss;
46 oss << "! Unable to open the input file: " << filename << " for reading";
47
48 throw oss.str();
49 }
50}
51
52void FatSystem::enableCache()
53{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected