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

Method clusterAddress

src/core/FatSystem.cpp:313–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313unsigned long long FatSystem::clusterAddress(unsigned int cluster, bool isRoot)
314{
315 if (type == FAT32 || !isRoot) {
316 cluster -= 2;
317 }
318
319 unsigned long long addr = (dataStart + bytesPerSector*sectorsPerCluster*cluster);
320
321 if (type == FAT16 && !isRoot) {
322 addr += rootEntries * FAT_ENTRY_SIZE;
323 }
324
325 return addr;
326}
327
328vector<FatEntry> FatSystem::getEntries(unsigned int cluster, int *clusters, bool *hasFree)
329{

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected