Verify has moved along and is updated: Defragster/T4LockBeta/tree/main/MakeFiles
Moved along but not working fully - it skips dirs as written so far
> Does not yet verify file content
> All files in a DIR count toward DIR.6 where ".6" says 6 files are expected
> Verifies reported file size to match that in the file name #SIZE.txt or #SIZE_xxx.txt
> Dirs without a ".#' are ignored for verification!
-Will run NON MTP to create files on SD card.
-Running as MTP build it will add media content indicated in notSetup() {moved from setup()} on 20 sec delay in loop() for MTP to let SerMon connect.
> After running that and "MakeData done." shows you can hit 'Enter' in Sermon to do a Directory Verify
-> It no longer prints each file in those checked folders as another func() does the work and advance the openNextFile(), and dir 'printing' was removed in the Verify
--> it really isn't doing a PrintDirectory().
If run on unclean media some variations will result in 'detected errors' from unexpected files depending on what may have changed.
> Must use this version of Makefiles.ino to generate subdirectories
-> it has the folder name.COUNT of files used to verify no lost files
> It also allows making a dir of same sized files of chosen size
-> prior versions always expected a series of files with added content between files
-> these same size files get size_
File#.txt, where File# changes if the content creation is changed.
Why is this helpful?: when Run as MTP.addFilesystem(DISK, "MakeFiles 2203");
> With known 'expected' file/folder content properly moved or edited MTP should never fail to leave Teensy Media Verifiably correct
-> This allows semi real time/'On Demand' verification testing without removing media or running another sketch
> Starting the sketch on EMPTY media will fill it with KNOWN content.
> COPY the data to PC and compare manually to SRC copy (like CodeCompare) to detect errors from Round Trip File copy
-> Or copy back to the MTP Media and hit Sermon 'Enter' and if ALL is well the content will verify
--> Either clean the media or put it in a subdirectory as desired
> Keep source on HOST PC and copy a folder over and do printDirectoryVerify()
> Make edits to MTP files on the HOST and confirm only the expected changes
-> delete a file from a counted directory:
MISSING 1 FILE(S) 1 File Error(s)
-> rename a file like 1424 with wrong file size to 1425:
Code:
DIR 333.1024 /
1425.txt XXXX File Size MISMATCH :1425
DONE RESULTS BAD HERE XXXXXX 1 File Error(s)
NOTE: Doing simple edits may result in OTHER MEDIA elements going bad!
-> I think I saw this once - but was busy editing other stuff so it may have been code reporting error, or restart file change.
> Files of arbitrary Size and number can be created in one or more folders
NOTE 2: After doing some edits one folder showed 404.txt? Going back gave wrong icon for all files
Note 3: Navigating down and back up resulted in PC Explorer confusion showing this path that does not exist:
Code:
This PC\Teensy\MakeFiles 2203\ManyF\222.1024\[B]222.1024\222.1024[/B]
Each time I double clicked 222.1024 it redrew as if in 'ManyF' after clicking into 333.1024 and then going 'back up'
Note 4: Right now MTP access to the Teensy SD Media is non-functional after browsing the media folders
> Data seems fine on the Teensy with DIR and fine on to restart MTP with Teensy repower.
TODO:
> Publish a new SD2203 {or SD2204 if I update the size of BLOCK#} ZIP for usable file content to copy 'Selected Folder(s)' from PC without having to run MakeFiles.
> Complete file content verification of expected content in 16 Byte Blocks: ...[zccc.3093x29ED4'\n'][zccc.3093x29ED5'\n']...
- each Block has same FILE#, and Each 0xBlock# is prior 0xBlock#++ to the end filler Bytes
- 5 hex char block# only good for 16MB of unique content, should have use 6-7 chars
-> okay now as long as no single run of MakeFiles passes this Mark or the 0xBlock#++ check would fail
- For REF: Keep and show Global File Count and Size in printDirectoryVerify() - it is only shown 'per directory'
- other feature creep ????
- ROOT file file verification isn't possible now - could add Folder on ROOT to key special case #_ROOT, or a File RootCnt.txt with SIZE of expected # files to trigger and verify file count
-> Add a func() to make files on Root with Key indicator
> Add MENU Commands
-> Only run/create notSetup() on command
-> Add Format Media
-> Run new printDirectoryVerify()
-> Run OLD printDirectory()
-> Run showMediaSpace();
-> Show Help
-> OTHER ????
--> TELL MTP host to RESYNC ???
Any questions or feedback or PR's I'm offline a few hours.
> Mike if you want to PR #ifdef in media other than: #define DISK SD