diff options
author | Jon Purdy <evincarofautumn@gmail.com> | 2017-10-02 22:41:55 +0300 |
---|---|---|
committer | Jon Purdy <evincarofautumn@gmail.com> | 2017-10-24 20:37:29 +0300 |
commit | 26aaf7617def42dcad96d4d0ea30970763cbaa91 (patch) | |
tree | 3d25332f082b0a97abaec9585207fde4ce2edf25 /mcs | |
parent | 477d5f3f7059c48ba808050fc04a1778fe3f96d6 (diff) |
[coop-handles] System.IO.MonoIO.CreateDirectory
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System.IO/MonoIO.cs | 11 |
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 fee1b521404..9008bcc6677 100644 --- a/mcs/class/corlib/System.IO/MonoIO.cs +++ b/mcs/class/corlib/System.IO/MonoIO.cs @@ -169,7 +169,16 @@ namespace System.IO // directory methods [MethodImplAttribute (MethodImplOptions.InternalCall)] - public extern static bool CreateDirectory (string path, out MonoIOError error); + private unsafe extern static bool CreateDirectory (char* path, out MonoIOError error); + + public static bool CreateDirectory (string path, out MonoIOError error) + { + unsafe { + fixed (char* pathChars = path) { + return CreateDirectory (pathChars, out error); + } + } + } [MethodImplAttribute (MethodImplOptions.InternalCall)] public extern static bool RemoveDirectory (string path, out MonoIOError error); |