|
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: 11189 |
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: 8760 |
I'm all in favour. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| circuit Guru Joined: 10/01/2016 Location: United KingdomPosts: 304 |
I agree - a sensible approach. |
||||
| bfwolf Senior Member Joined: 03/01/2025 Location: GermanyPosts: 233 |
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: 3135 |
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 |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5851 |
Since mmbasic is in essence case ignorant, it is best the a drive also is. My 5 cents Volhout P.S. The only case sensitivity that sometimes catches me is when I have a file that is EDIT-ed at a CMM2. Because default it save the file with upper case ".BAS" extension. And MMEdit in default configuration on Linux ignores .BAS files, it expects .bas (lower case). But that may be more of a Linux (case sensitive) thing than MMBasic or MMEdit. Edited 2026-02-25 18:45 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| Peter63 Senior Member Joined: 28/07/2017 Location: SwedenPosts: 146 |
Yes, from me / Peter63 |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4299 |
Linux does tend towards lower case by default (a bit like ordinary writing like this does). MMEdit could easily have a setting to use .BAS or anything as needed (sorry Jim, more work). John |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6506 |
Not really any more work for me. MMEdit already has the option to "use *.* for file selector" in Preferemces. That is the best I can do. Windows is happy finding all caSes with ".bas" and I am not going to try and add .Bas, .baS etc when *.* is already available. Jim VK7JH MMedit |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4299 |
Maybe that's all Harm needs. John |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |