worked on FAT stuff and tests
This commit is contained in:
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user