
Compact a flash directory, keeping only the entries young enough to matter.
January 21, 2004. Spirit had been on Mars 18 sols when it went quiet, then came back sending beeps and nothing else. Its flash still held every file written during the seven month cruise, and rebuilding that directory in RAM took more memory than the rover had, so it rebooted. Then it did it again, about once an hour, for days. JPL talked it into a mode that ignored the flash and cleared the old files out. Do the sweep.
compact(out, {5,900,40,1200}, 4, 100)Expected result
2 5 40For your own tracking. Tests grade your code.
compact(out, {900,800}, 2, 100)Expected result
0compact(out, {1,2,3}, 3, 100)Expected result
3 1 2 3Expected files
flash.cAllowed functions
None. Write every helper yourself.
