diff options
author | Jon Purdy <evincarofautumn@gmail.com> | 2017-10-03 04:32:21 +0300 |
---|---|---|
committer | Jon Purdy <evincarofautumn@gmail.com> | 2017-10-24 20:37:29 +0300 |
commit | 77fd6e0846817643d41f1b420661cbf8aace9ccb (patch) | |
tree | 49ae18d4eccb5c2686480270963fdf94b214678d /mcs | |
parent | 16ebef70ed8cc9c17d91038779a8cbd216e89344 (diff) |
[coop-handles] System.IO.MonoIO.SetFileAttributes
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 f64f26c3ff4..db1d133b230 100644 --- a/mcs/class/corlib/System.IO/MonoIO.cs +++ b/mcs/class/corlib/System.IO/MonoIO.cs @@ -288,7 +288,16 @@ namespace System.IO } [MethodImplAttribute (MethodImplOptions.InternalCall)] - public extern static bool SetFileAttributes (string path, FileAttributes attrs, out MonoIOError error); + private extern static bool SetFileAttributes (char* path, FileAttributes attrs, out MonoIOError error); + + public static bool SetFileAttributes (string path, FileAttributes attrs, out MonoIOError error) + { + unsafe { + fixed (char* pathChars = path) { + return SetFileAttributes (pathChars, attrs, out error); + } + } + } [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern static MonoFileType GetFileType (IntPtr handle, out MonoIOError error); |