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 04:32:21 +0300
committerJon Purdy <evincarofautumn@gmail.com>2017-10-24 20:37:29 +0300
commit77fd6e0846817643d41f1b420661cbf8aace9ccb (patch)
tree49ae18d4eccb5c2686480270963fdf94b214678d /mcs
parent16ebef70ed8cc9c17d91038779a8cbd216e89344 (diff)
[coop-handles] System.IO.MonoIO.SetFileAttributes
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 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);