|
Forum Index : Microcontroller and PC projects : Proposed change to PicoMite: remove A: drive filename case sensitivity
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10984 |
One of the oddities of MMbasic is that filesnames on the A: drive are case sensitive. Nothing else is. This means that HELLO.bas is different to hello.bas is different to hello.BAS etc. Filenames on the B: drive are not case sensitive and doing something like copying a directory from A: to B: which contains both "HELLO.bas" and "Hello.BAS" will probably result in one of them going missing. Unless anyone strongly objects, I propose to remove the case sensitivity of LFS on the A: drive. Is this OK? |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8587 |
I'm all in favour. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 297 |
I agree - a sensible approach. |
||||
| bfwolf Senior Member Joined: 03/01/2025 Location: GermanyPosts: 176 |
How do you plan to do that? I don't recall seeing a configuration switch like "IGNORECASE" when I used LittleFS in a project, and I just checked again and couldn't find anything about it in either the documentation or the source code. One possible solution would be a dynamic option that converts all path names from MMBasic to lowercase before passing them to LittleFS. But existing files with mixed case would then be invisible/inaccessible. All in all, changing that is a delicate matter! The oddity is actually inherent in FATFS, which only supports "ignorecase". I think I saw somewhere that NTFS can also be case-sensitive. Case sensitivity is standard for Unix filesystems anyway. Regards, bfwolf. |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 3030 |
Presumably the introduction of this would involve a firmware update that will erase A:, as some previous ones have, so there won't be any existing files. And that is fine as it does so consistently, but on the Pico there is inconsistency. In MMBasic and B: case is ignored so a change makes sense. As for the method of changing it another possible solution, with the aid of Claude, may be to change LittleFS itself, rather than the interface to it. Converting all path names from MMBasic to lowercase before passing them to LittleFS may require a place to store the names with case intact to match the way B: behaves. For the user interface it displays the original character cases. A hidden file that mirrors the FAT / ToC but with cases preserved might work. No doubt Peter will find the best method. . Edited 2026-02-25 10:36 by phil99 |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |