General Filename Poll
Posted: Thu Jun 29, 2006 2:45 pm
Do you think file names should be case sensitive or non-case sensitive? When you post, please explain your reasoning.
The Place to Start for Operating System Developers
https://f.osdev.org/
The correction is a good idea, but I would suggest having the UI bring up a list of letter matches (with the wrong case) if there is no filename with the right letters and cases, rather than guessing. this could be simpler, to implement, especially if folders are supported (the list would then only include the files within the current directory), since then as part of the metadata the filenmae in only lower (or upper, it dosen't matter) case, which the OS searches if the exact charecters do not match anything.chase wrote:I voted case sensitive, there is just too much chance of name collision with a case insensitive FS. I do think that the user interface(gui or cli) should be able to correct user supplied names for operations like opening files. And by correct I mean match on the closest case.
That was a small bug.. it's not present in the new versions.I clearly made a casing error. Try to change this casing in windows and it'll complain that the source and destination are the same file, and fail. A non-computer user doesn't understand why this is (yes, this could be special cased to fixed...)
I voted case sensitive, there is just too much chance of name collision with a case insensitive FS.
..I don't about you guys but I would get more confused over test and Test, than test1 and test2. In any case, I still don't understand why you need to would have a specific need to have case sensitive files. I think name collisions would occur more with files that have the same spelling. You would sometimes forget and have to open each file to see which is the one you want.One disadvantage to case senstive filenames, however, is intricate filenames, with lots of different casing.
But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
It's true, it's a fairly petty thing to say, in retrospect. As I mentioned, it's a fairly easy thing to work-around (I was under the impression this bug has existed for some time? No? I only use windows at work, so I can't say, myself).JAAman wrote: @carbonbased:
i hold you in high regard and it surprises me that you would make such a claim, holding an entire concept guilty for a single (short lived) bug in a single implementation of the concept
Most likely with a database. Files wouldn't have names and there wouldn't even be directories. Files would have metadata(think the type of stuff storied in an inode), there are actually some official metadata specs that I can look up but basically files would have properties like title, category(many possibly), date-time, etc. Your UI could present "folders" is you wanted for the different categories but files could easily exist in multiple categories. If you've seen a website where you can "tag" pictures or stories it's kinda like that.ComputerPsi wrote:What is "non-existent (Metadata based FS)"? How does it work?
carbonBased wrote:Oh, and btw... about the meta-data... is the meta-data case sensitive or insensitive?
No. He is saying, I think, case preservative and case insensitive. It means that when the filename is set, the filesystem retains the case, but you do not have to match case to refer to the file. This is pretty much how windows works.gaf wrote:But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
cheers,
gaf
So would it be a case insensitive filesystem with the case sensitive name stored in something like an inode or would the filesystem be case sensitive and the fopen type calls would insure that the file could be open regardless of case and make sure there are no case insensitve duplicate names in a dir? With the second you could make it case sensitive later...rexlunae wrote:No. He is saying, I think, case preservative and case insensitive. It means that when the filename is set, the filesystem retains the case, but you do not have to match case to refer to the file. This is pretty much how windows works.gaf wrote:But isn't that actually case unaware ? A case-sensitive operating system compares the strings directly, a case-unaware system runs tolower() first..JAAman wrote:I have to say case aware -- that means the files can freely mix capitalization as the user wishes, but capitalization doesnt change the file name
cheers,
gaf
This is my preference as well. I think it's pretty dubious to support having multiple files in the same directory with names differing only by case, but I like to have the case I specified remembered.
I would only store the case sensitive name. When fopen or whatever is run, I would check the directory for name conflicts using to(upper|lower). I don't even really see the benefit of storing a pre-converted name.chase wrote:
So would it be a case insensitive filesystem with the case sensitive name stored in something like an inode or would the filesystem be case sensitive and the fopen type calls would insure that the file could be open regardless of case and make sure there are no case insensitve duplicate names in a dir? With the second you could make it case sensitive later...
Next poll, what's better: toupper or tolower
On average most of the time you'll be opening existing files instead of creating new ones. Storing the preconverted name allows us to drop half of the to(upper|lower) calls.rexlunae wrote: I would only store the case sensitive name. When fopen or whatever is run, I would check the directory for name conflicts using to(upper|lower). I don't even really see the benefit of storing a pre-converted name.
ToUpper, of course. You see, it's really a necesity now, simply because *nix (and derivitives) have depleted our stores of lower-cased characters.chase wrote: Next poll, what's better: toupper or tolower