Case-insensitive filesystem lookups
Case-insensitive filesystem lookups
Posted May 25, 2018 19:03 UTC (Fri) by drag (guest, #31333)In reply to: Case-insensitive filesystem lookups by excors
Parent article: Case-insensitive filesystem lookups
Since Unix files can be arbitrary strings then just use a hash of the file to store it in the file system. Then you manage names on the application layer by providing a handy dandy API for everybody to use.
Because just imagine that instead of one locale you have to make insensitivity work for ALL locales. A lot of Linux file systems house data that is globally sourced using languages and names from dozens, if not hundreds, of different languages.
Good luck making that work on a file-system layer.
I mean: what are you going to do?
To have any remote chance of making it work in a case sensitive manner is by having the locale of each file embedded right there in the file system's metadata so it can be correctly managed in the way it was intended. And then what are you going to do when you have a English user from North America edit a file somebody made from Greece? Change the locale? Make the insensitivity work differently or now force the English user to understand the character set used by the other person from Greece? How are you going to deal with file names that don't conflict in the original locale, but do after somebody edits it?
So the choice is really:
1. Have a case sensitive file system that always works under all circumstances that is simple, robust, and fast.
2. Have a case insensitive system with massive amounts of extra code and logic that will never actually have a chance of working.
YES; having a sensitive file system is a bad UI. But it's impossible to make it actually work otherwise.
Therefore: If you are looking for a very good user interface exposing a Unix-style file system to the user is not a good solution. You have to do something else.
