-
Notifications
You must be signed in to change notification settings - Fork 76
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
LFN support #12
Comments
See #157 |
I wanted to see how characters outside the BMP are encoded on Windows 11 on a FAT16 filesystem. The file was called
We can see that |
Note that worst case, a filename could consist of 255 codepoints, each between |
Was:
Now:
fn open_lfn_in_dir(&self, dir: RawDirectory, name: &str, mode: Mode)
fn open_dir(&self, dir: RawDirectory, name: &str)
Note that opening an existing file is easier, as we can match a
&str
against the LFN entries on disk. Creating a new file is more difficult because we need to:a) work out how many 16-bit code units are required to store the filename
b) work out how many directory entries are required to store the long filename chunks and the real directory entry (13 code units per chunk)
c) find a gap in the directory with that many consecutive deleted directory entries, or at the end of the directory (using any deleted directory entries which are located at the end)
d) write out the LFN chunks as well as the actual directory entry
The text was updated successfully, but these errors were encountered: