-
Notifications
You must be signed in to change notification settings - Fork 86
How to read the LFN for a file? #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You'll probably need to write an alternative version of The logic would be that as you iterate, if you see an LFN fragment you convert the UCS-2 characters to UTF-8 and push them into the storage byte slice. Then when you get a non-LFN dir entry, you do the checksum, and if it matches, pass that filename in the You could just modify |
Oh and IIRC You can probably force Linux to mount a volume without LFN support and get it to show you the fragments. Or you can just read https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#VFAT_long_file_names. Or you can patch the embedded-sdmmc code to not hide the fragments (although note, some of the chars are stored in the timestamp fields so the entries look really weird). |
Apologies if this is already in an example somewhere but I’ve not spotted it.
I need to somehow read the large file name for a file. I don’t mind getting an iter back of all the short file names for the file & having to compose the long file name myself, if that fits better with
no_std
& how FAT works.I see the
is_lfn
property but I’ve not yet found anywhere that comes back astrue
- even the files which end in~1
.Ideally I want to retrieve a file using the large file name (but I can see how that could be out of scope)
The text was updated successfully, but these errors were encountered: