// (C) 2002\r
//\r
\r
+//\r
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
using System;\r
\r
namespace System.IO {\r
// the pattern '*.*' matches all files (i think . matches the extension),\r
// whereas under UNIX it should only match files containing the '.' character.\r
\r
- class SearchPattern {\r
+ class SearchPattern\r
+ {\r
+/* \r
public SearchPattern (string pattern) : this (pattern, false) { }\r
\r
public SearchPattern (string pattern, bool ignore)\r
\r
op.Argument = pattern.Substring (ptr, end - ptr);\r
if (ignore)\r
- op.Argument = op.Argument.ToLower ();\r
+ op.Argument = op.Argument.ToLowerInvariant ();\r
\r
ptr = end;\r
break;\r
\r
string str = text.Substring (ptr, length);\r
if (ignore)\r
- str = str.ToLower ();\r
+ str = str.ToLowerInvariant ();\r
\r
if (str != op.Argument)\r
return false;\r
}\r
\r
// private static\r
-\r
+*/\r
internal static readonly char [] WildcardChars = { '*', '?' };\r
+/* \r
internal static readonly char [] InvalidChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };\r
\r
private class Op {\r
End, // end of pattern\r
True // always succeeds\r
};\r
+*/\r
}\r
}\r