Marlin
Marlin copied to clipboard
Set or reset DIR_ATT_HIDDEN attribute for directory entry
Provide SdFile hide/unhide directory entry
Ok, but … why? This is not something that Marlin will be using, as far as existing plans go. And, when an SD card is mounted in target mode, the host operating system handles file operations.
The Marlin FAT driver does not support deleting files with long names. This operation results with orphans in the directory entry. Instead of the delete operation, you can apply the operation of hiding the file, which gives the same result for listing them.
Wouldn't it be better to port over the long filename deletion code from the newest greiman/SDFat?
Yes, it is better, but this is a slightly different functionality, which could also be
It seems like adding the capability to the code doesn't hurt anything, since nothing calls it and it won't ever be linked in.
I think using hide
in place of delete
is a terrible idea. That will just inexplicably fill up people's SD cards with hidden files, which sounds pretty incorrect to me. Maybe we are already doing that with orphaned entries, but I don't really agree with replacing one bug with another...
I'm sorry that last comment probably came across harsher than intended. While I don't personally like the proposed solution, there is a lot of value in bringing up ideas and discussing alternative solutions. I don't want to discourage you from trying to come up with ways to solve problems you encounter, even if this one doesn't move forward. I often end up talking myself out of my own ideas as well!