worked on FAT stuff and tests

This commit is contained in:
2021-02-21 21:04:11 +01:00
parent 4ac72c678f
commit 2e281f6d26
12 changed files with 758 additions and 396 deletions

View File

@@ -1,6 +1,10 @@
#pragma once
/** helper class to iterate all free clusters of the Filesystem */
/**
* helper class to iterate all free clusters of the Filesystem.
* starts at cluster number 2 and then iterates over all subsequent clusters
* stopping at the free ones
*/
class FreeClusterIterator {
FS& fs;
@@ -15,6 +19,8 @@ public:
/** get the next free cluster that is available */
ClusterNr next() {
// TODO: end of filesystem reached
while(true) {
const ClusterNr tmp = fs.getNextCluster(cur);
if (tmp.isFree()) {return cur;}