Hello,
On Fri, Jun 15, 2012 at 4:55 AM, Mateusz Loskot
On 15 June 2012 07:12, Nathan Ridge
wrote: I couldn't find this info in the Filesystem documentation, so I thought I'd ask here: is equality comparison between path objects case-insensitive on Windows?
Two paths are compared using lexicographical comparison, it says in the docs. Looking at the implementation, it is case-sensitive lexicographical order.
BTW, the documentation only points
"Case sensitivity is a property of the pathname itself, and not the platform"
I would suggest that case sensitivity is a property of the file system, not the path name and certainly not the platform. In our product we use boost::filesystem extensively in a cross-platform context, and we always check case sensitivity whenever we see a file system that we haven't seen before. The check consists in taking the name of a known file in the new file system, converting it to upper or lower case depending on the current state of the name, and checking whether the converted name exists or not. This of course will fail in a situation where the files hello and HELLO exist in the same directory, but we assume that case is an aberration. Cheers, Will
So, IMO it is correct to assume filesystem::path is case-sensitive regardless OS.
Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users