Given that most file systems aren't case-sensitive in the first place (and it's seldom you'd come across titles that differ only by case in those which are, let alone care about such differences), I suggest tweaking the function to ignore case by default.
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
fs.find() - Case Sensitivity
Started by Bomb Bloke, 30 June 2014 - 02:47 AMPosted 30 June 2014 - 04:47 AM
At least in CC 1.63, fs.find() appears to be case-sensitive. For example, "*.txt" will fail to find files with a "TXT" extension.
Given that most file systems aren't case-sensitive in the first place (and it's seldom you'd come across titles that differ only by case in those which are, let alone care about such differences), I suggest tweaking the function to ignore case by default.
Given that most file systems aren't case-sensitive in the first place (and it's seldom you'd come across titles that differ only by case in those which are, let alone care about such differences), I suggest tweaking the function to ignore case by default.
Posted 30 June 2014 - 07:40 AM
Well if you test it you will find whole fs api is case sensitive. Why make one part non sensitive and leave other sensitive?
Posted 30 June 2014 - 08:08 AM
Because it's relatively easy to deal with it in most other scenarios, though I certainly wouldn't be against tweaking it across the board.
Posted 30 June 2014 - 02:40 PM
I would not support it as default settings. As option only.I suggest tweaking the function to ignore case by default.
Posted 30 June 2014 - 04:17 PM
You could always rewrite fs.find() yourself to add features that you want.
Posted 30 June 2014 - 04:42 PM
Indeed; I can, and I have - but that takes the point out of having the function bundled into ComputerCraft. Since it is in there, I figure it might as well be useful.
Edited on 30 June 2014 - 02:43 PM
Posted 30 June 2014 - 04:56 PM
In my opinion though, I think case sensitive elements fit quite well with Lua anyway, since Lua is pretty strict about it.
Posted 01 July 2014 - 01:53 AM
Lua does what it's coded to do - the way I see things, the system should serve the user; not the other way around.
That said: This is not demand, nor even a request… It's a suggestion. While I believe ComputerCraft would be slightly improved by it, and know that it would be trivial to implement, it ultimately makes very little difference to me whether it's put into practise or not.
That said: This is not demand, nor even a request… It's a suggestion. While I believe ComputerCraft would be slightly improved by it, and know that it would be trivial to implement, it ultimately makes very little difference to me whether it's put into practise or not.
Edited on 30 June 2014 - 11:58 PM
Posted 01 July 2014 - 02:21 AM
I think even trivial is an overstatement. it would be fixed with literally two word difference in the method call (assuming dan did it the correct way) or two method calls to lower/upper the strings (if he did it the bad way).and know that it would be trivial to implement
Edited on 01 July 2014 - 12:21 AM