| 50 | } |
| 51 | |
| 52 | void FatSystem::enableCache() |
| 53 | { |
| 54 | if (!cacheEnabled) { |
| 55 | cout << "Computing FAT cache..." << endl; |
| 56 | for (int cluster=0; cluster<totalClusters; cluster++) { |
| 57 | cache[cluster] = nextCluster(cluster); |
| 58 | } |
| 59 | |
| 60 | cacheEnabled = true; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void FatSystem::enableWrite() |
| 65 | { |