Add case insensitive option to file directory/exist functions

in the docs, to handle case, sometimes we need to check the case of the path and get it exact,
now i know this can be addressed in other ways, but it would be nice to have a BIF option
to match case.

an automatic case insensitive match would save a lot of pain for cross platform code on case (in)sensitive file systems, i.e windows vs unix file systems

something like (dunno about returnMatch, but you know what i mean)

// returns either the exact case filename or an empty string
FileExists(source=filePath, returnMatch=true);

// returns either exact case directory or an empty string
DirectoryExists(source=filePath, returnMatch=true);
1 Like

I just ran into a case with code on Windows that will not run on Linux due to case sensitivity. I would propose we add Regex filtering to these functions with a option for case.

Download Notepad ++
open up a file, hit select all, go to edit, change case to lower, save file

or on linux you can vim (vi on rhel / centos) filename
command: ```

or you can sed it
sed 's/.*/\L&/g' < filename

you can awk it
awk '{print tolower($0)}' < filename

you can use perl
perl -pe '$_=lc' filename

you can tr it
tr [:upper:] [:lower:] < filename > output.filename

I am sure there are at least a dozen more ways to do this, but the point is, its not a show stopper, if anything its just a minor annoyance.