//\r
\r
using System;\r
+using System.Collections.Generic;\r
using System.Diagnostics;\r
using System.Globalization;\r
using System.IO;\r
using System.Text;\r
using System.Threading;\r
\r
+#if !MONOTOUCH\r
+using Mono.Unix;\r
+#endif\r
using NUnit.Framework;\r
\r
namespace MonoTests.System.IO\r
[TestFixture]\r
public class DirectoryTest\r
{\r
- string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");\r
+ static readonly string TempSubFolder = "MonoTests.System.IO.Tests";\r
+ string TempFolder = Path.Combine (Path.GetTempPath (), TempSubFolder);\r
static readonly char DSC = Path.DirectorySeparatorChar;\r
\r
[SetUp]\r
if (Directory.Exists (TempFolder))\r
Directory.Delete (TempFolder, true);\r
}\r
-\r
+#if !MONOTOUCH\r
+ [Test] //BXC #12461\r
+ public void EnumerateFilesListSymlinks ()\r
+ {\r
+ if (!RunningOnUnix)\r
+ Assert.Ignore ("Not running on Unix.");\r
+\r
+ var afile = Path.Combine (TempFolder, "afile.src");\r
+ var bfile = Path.Combine (TempFolder, "bfile.src");\r
+ var cdir = Path.Combine (TempFolder, "cdir.src");\r
+\r
+ File.AppendAllText (afile, "hello");\r
+ var info = new UnixFileInfo (afile);\r
+ info.CreateSymbolicLink (bfile);\r
+ Directory.CreateDirectory (cdir);\r
+\r
+ var files0 = Directory.GetFiles (TempFolder, "*.src");\r
+ Array.Sort (files0);\r
+ Assert.AreEqual (2, files0.Length, "#1");\r
+ Assert.AreEqual (afile, files0 [0], "#2");\r
+ Assert.AreEqual (bfile, files0 [1], "#3");\r
+\r
+ var files1 = new List<string> (Directory.EnumerateFiles (TempFolder, "*.src")).ToArray ();\r
+ Array.Sort (files1);\r
+ Assert.AreEqual (2, files1.Length, "#1.b");\r
+ Assert.AreEqual (afile, files1 [0], "#2.b");\r
+ Assert.AreEqual (bfile, files1 [1], "#3.b");\r
+\r
+ var files2 = Directory.GetFileSystemEntries (TempFolder, "*.src");\r
+ Array.Sort (files2);\r
+ Assert.AreEqual (3, files2.Length, "#1.c");\r
+ Assert.AreEqual (afile, files2 [0], "#2.c");\r
+ Assert.AreEqual (bfile, files2 [1], "#3.c");\r
+ Assert.AreEqual (cdir, files2 [2], "#4.c");\r
+\r
+ var files3 = new List<string> (Directory.EnumerateFileSystemEntries (TempFolder, "*.src")).ToArray ();\r
+ Array.Sort (files3);\r
+ Assert.AreEqual (3, files3.Length, "#1.d");\r
+ Assert.AreEqual (afile, files3 [0], "#2.d");\r
+ Assert.AreEqual (bfile, files3 [1], "#3.d");\r
+ Assert.AreEqual (cdir, files3 [2], "#4.d");\r
+ }\r
+#endif\r
[Test]\r
public void CreateDirectory ()\r
{\r
}\r
}\r
\r
+ /* Commented out: a directory named ":" is legal in unix\r
[Test]\r
public void CreateDirectoryNotSupportedException ()\r
{\r
}\r
DeleteDirectory (":");\r
}\r
+ */\r
\r
[Test]\r
public void CreateDirectory_Path_Null ()\r
fstream.Close();\r
\r
DirectoryInfo dinfo = Directory.CreateDirectory (path);\r
-#if NET_2_0\r
Assert.Fail ("#1");\r
} catch (IOException ex) {\r
Assert.AreEqual (typeof (IOException), ex.GetType (), "#2");\r
// exception message contains the path\r
Assert.IsTrue (ex.Message.Contains (path), "#3");\r
Assert.IsNull (ex.InnerException, "#4");\r
-#else\r
- Assert.IsFalse (dinfo.Exists, "#2");\r
- Assert.IsTrue (dinfo.FullName.EndsWith ("DirectoryTest.Test.ExistsAsFile"), "#3");\r
- Assert.AreEqual ("DirectoryTest.Test.ExistsAsFile", dinfo.Name, "#4");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
DeleteFile (path);\r
Assert.IsFalse (Directory.Exists (null as string));\r
}\r
\r
-#if !TARGET_JVM // We don't support yet the Process class.\r
+#if !MOBILE // We don't support yet the Process class.\r
[Test] // bug #78239\r
public void ExistsAccessDenied ()\r
{\r
if (!RunningOnUnix)\r
- return; // this test does not work on Windows.\r
+ Assert.Ignore ("Not running on Unix."); // this test does not work on Windows.\r
\r
string path = TempFolder + DSC + "ExistsAccessDenied";\r
\r
Directory.CreateDirectory (path);\r
- Process.Start ("/bin/chmod", "000 " + path).WaitForExit ();\r
+ global::Mono.Posix.Syscall.chmod (path, 0);\r
try {\r
Assert.IsFalse (Directory.Exists(path + DSC + "b"));\r
} finally {\r
- Process.Start ("/bin/chmod", "755 " + path).WaitForExit ();\r
+ global::Mono.Posix.Syscall.chmod (path, (global::Mono.Posix.FileMode) 755);\r
Directory.Delete (path);\r
}\r
}\r
#endif\r
\r
[Test]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
[ExpectedException(typeof(ArgumentNullException))]\r
public void GetCreationTimeException1 ()\r
{\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException2 ()\r
{\r
Directory.GetCreationTime (string.Empty);\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException(typeof(IOException))]\r
-#endif\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";\r
try {\r
DateTime time = Directory.GetCreationTime (path);\r
\r
-#if NET_2_0\r
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException4 ()\r
{\r
Directory.GetCreationTime (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeException5 ()\r
{\r
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException1 ()\r
{\r
Directory.GetCreationTimeUtc (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException2 ()\r
{\r
Directory.GetCreationTimeUtc (string.Empty);\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException (typeof (IOException))]\r
-#endif\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtc_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";\r
try {\r
DateTime time = Directory.GetCreationTimeUtc (path);\r
\r
-#if NET_2_0\r
Assert.AreEqual (1601, time.Year, "#1");\r
Assert.AreEqual (1, time.Month, "#2");\r
Assert.AreEqual (1, time.Day, "#3");\r
Assert.AreEqual (0, time.Hour, "#4");\r
Assert.AreEqual (0, time.Second, "#5");\r
Assert.AreEqual (0, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException4 ()\r
{\r
Directory.GetCreationTimeUtc (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
public void GetCreationTimeUtcException5 ()\r
{\r
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTime_Null ()\r
{\r
Directory.GetLastAccessTime (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException2 ()\r
{\r
Directory.GetLastAccessTime (string.Empty);\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException (typeof (IOException))]\r
-#endif\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTime_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";\r
try {\r
DateTime time = Directory.GetLastAccessTime (path);\r
\r
-#if NET_2_0\r
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException4 ()\r
{\r
Directory.GetLastAccessTime (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeException5 ()\r
{\r
Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtc_Null ()\r
{\r
Directory.GetLastAccessTimeUtc (null as string);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException2 ()\r
{\r
Directory.GetLastAccessTimeUtc (string.Empty);\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException (typeof (IOException))]\r
-#endif\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtc_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";\r
try {\r
DateTime time = Directory.GetLastAccessTimeUtc (path);\r
\r
-#if NET_2_0\r
Assert.AreEqual (1601, time.Year, "#1");\r
Assert.AreEqual (1, time.Month, "#2");\r
Assert.AreEqual (1, time.Day, "#3");\r
Assert.AreEqual (0, time.Hour, "#4");\r
Assert.AreEqual (0, time.Second, "#5");\r
Assert.AreEqual (0, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException4 ()\r
{\r
Directory.GetLastAccessTimeUtc (" ");\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
public void GetLastAccessTimeUtcException5 ()\r
{\r
Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException (typeof (IOException))]\r
-#endif\r
public void GetLastWriteTime_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTime.1";\r
try {\r
DateTime time = Directory.GetLastWriteTime (path);\r
\r
-#if NET_2_0\r
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
-#if !NET_2_0\r
- [ExpectedException (typeof (IOException))]\r
-#endif\r
public void GetLastWriteTimeUtc_NonExistingPath ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTimeUtc.1";\r
try {\r
DateTime time = Directory.GetLastWriteTimeUtc (path);\r
\r
-#if NET_2_0\r
Assert.AreEqual (1601, time.Year, "#1");\r
Assert.AreEqual (1, time.Month, "#2");\r
Assert.AreEqual (1, time.Day, "#3");\r
Assert.AreEqual (0, time.Hour, "#4");\r
Assert.AreEqual (0, time.Second, "#5");\r
Assert.AreEqual (0, time.Millisecond, "#6");\r
-#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM\r
public void CreationTime ()\r
{\r
if (RunningOnUnix)\r
}\r
\r
[Test]\r
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM\r
public void LastAccessTime ()\r
{\r
string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
public void SetLastAccessTimeUtcException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentNullException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException2 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(FileNotFoundException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException4 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))]\r
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
public void SetCreationTimeUtcException5 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
{\r
if (!RunningOnUnix)\r
// on Windows, backslash is used as directory separator\r
- return;\r
+ Assert.Ignore ("Not running on Unix.");\r
\r
string dir = Path.Combine (TempFolder, @"sub\dir");\r
Directory.CreateDirectory (dir);\r
{\r
if (!RunningOnUnix)\r
// on Windows, backslash is used as directory separator\r
- return;\r
+ Assert.Ignore ("Not running on Unix.");\r
\r
string file = Path.Combine (TempFolder, @"doc\temp1.file");\r
File.Create (file).Close ();\r
Assert.AreEqual (Path.Combine (TempFolder, "tempFile4"), files [0], "#N3");\r
}\r
\r
+ [Test]\r
+ public void GetFiles_580090 ()\r
+ {\r
+ string cwd = Directory.GetCurrentDirectory ();\r
+ Directory.SetCurrentDirectory (Path.GetTempPath ());\r
+\r
+ string tempFile = Path.Combine (TempFolder, "tempFile.txt");\r
+ File.Create (tempFile).Close ();\r
+\r
+ try {\r
+ string [] files = Directory.GetFiles (".", TempSubFolder + DSC + "*.t*");\r
+ Assert.IsNotNull (files, "#J1");\r
+ Assert.AreEqual (1, files.Length, "#J2");\r
+ }\r
+ finally {\r
+ Directory.SetCurrentDirectory (cwd);\r
+ }\r
+ }\r
+\r
+\r
[Test]\r
[ExpectedException (typeof (ArgumentNullException))]\r
public void SetCurrentDirectoryNull ()\r
// check for Unix platforms - see FAQ for more details\r
// http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F\r
int platform = (int) Environment.OSVersion.Platform;\r
- return ((platform == 4) || (platform == 128));\r
+ return ((platform == 4) || (platform == 128) || (platform == 6));\r
}\r
}\r
\r