[Mono-list] Determining case sensitive environments
charlie at nunit.com
Mon Dec 8 20:24:16 EST 2008
I asked a similar question a while back and it was pointed
out to me that the file system is independent of the platform
and that you can mave more than one file system available
on a machine!
In the end, I made case-sensitivity a parameter to the
methods I was creating, with other overloads that left
off the parameter defaulting to the "standard" file
system for my platform.
> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Chris Capon
> Sent: Monday, December 08, 2008 3:41 PM
> To: mono-list at lists.ximian.com
> Subject: [Mono-list] Determining case sensitive environments
> I'm building a cross platform application in .NET which uses
> regular expressions for file pattern matching. The
> application runs under Windows and Linux (so far).
> When comparing patterns with paths, the code needs to know
> whether the file system expects filenames to be case
> insensitive (Windows) or if it expects filenames to match
> exactly (Linux).
> I'm trying to find the best way to tell if an environment is
> case sensitive or not.
> So far, all I have is the use of:
> but because it has a variety of values to represent Windows,
> I'm concerned that more might be introduced in the future -
> breaking my code. Also, I'm not sure if PlatformID.Unix is
> sufficient for something like the OS/X environment which may
> be partially case insensitive.
> Does anyone have a better way to determine case sensitivity?
> I'd rather not create a file on the filesystem just to find
> out as this introduces problems of its own.
> View this message in context:
> Sent from the Mono - General mailing list archive at Nabble.com.
> Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list