|
User #90775 1730 posts
Whirlpool Enthusiast
|
I had my data on Fat32 drive and when I used the function file_exists() I found it to be case insensitive. But now the data has been moved to a Ext3 partition (Linux) this function seems to be working with case sensitive. |
posted 2008-May-11, 8am AEST
|
|
User #182751 140 posts
Forum Regular
|
I would expect the behaviour that you have mentioned. |
posted 2008-May-11, 9am AEST
|
|
User #6707 61 posts
Forum Regular
|
Have to test every file in the directory, and lowercase both values (your search string, and the string returned from a directory parse) to guarantee its existence.. |
posted 2008-May-11, 11am AEST
|
|
User #44690 10502 posts
Whirlpool Forums Addict
|
Testing for file existence is almost always a code smell -- it's almost always better to attempt to do something with the file, then handle the error of its non-existence afterwards. |
posted 2008-May-11, 12pm AEST
edited 2008-May-11, 12pm AEST
|
|
User #28944 2031 posts
Whirlpool Forums Addict
|
The problem you will have though is what happens if there are two files? |
posted 2008-May-11, 3pm AEST
|
|
User #90775 1730 posts
Whirlpool Enthusiast
|
Thanks, I will just go and manually rename the files. |
posted 2008-May-12, 12pm AEST
edited 2008-May-12, 12pm AEST
|