Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorJon Purdy <evincarofautumn@gmail.com>2017-10-03 05:39:58 +0300
committerJon Purdy <evincarofautumn@gmail.com>2017-10-24 20:37:29 +0300
commitb73d5302b1d02006c3acdb0ebb9042142b9151e7 (patch)
treef5ecddf0859d075593cd3230ac810b6dc436ddb2 /mcs
parent52786872cd2b12bacf4ffd433b48c202143ddb01 (diff)
[coop-handles] System.IO.MonoIO.FindFirstFile
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/System.IO/MonoIO.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.IO/MonoIO.cs b/mcs/class/corlib/System.IO/MonoIO.cs
index db1d133b230..3567809b9da 100644
--- a/mcs/class/corlib/System.IO/MonoIO.cs
+++ b/mcs/class/corlib/System.IO/MonoIO.cs
@@ -319,7 +319,16 @@ namespace System.IO
//
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- public extern static IntPtr FindFirstFile (string path_with_pattern, out string fileName, out int fileAttr, out int error);
+ private unsafe extern static IntPtr FindFirstFile (char* pathWithPattern, out string fileName, out int fileAttr, out int error);
+
+ public static IntPtr FindFirstFile (string pathWithPattern, out string fileName, out int fileAttr, out int error)
+ {
+ unsafe {
+ fixed (char* pathWithPatternChars = pathWithPattern) {
+ return FindFirstFile (pathWithPatternChars, out fileName, out fileAttr, out error);
+ }
+ }
+ }
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static bool FindNextFile (IntPtr hnd, out string fileName, out int fileAttr, out int error);