* UnixDirectory.cs, UnixDirectoryInfo.cs UnixFile.cs, UnixFileSystemInfo.cs,
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / UnixDirectory.cs
index 88e8e6a38b39162dc0ea09874f772e9d32798a78..f867975e769525c57023a1bd05c1e9eb77b64208 100644 (file)
@@ -40,6 +40,7 @@ namespace Mono.Unix {
                private UnixDirectory () {}
 
                [CLSCompliant (false)]
+               [Obsolete ("Use CreateDirectory (string, Mono.Unix.Native.FilePermissions)")]
                public static UnixDirectoryInfo CreateDirectory (string path, FilePermissions mode)
                {
                        int r = Syscall.mkdir (path, mode);
@@ -47,6 +48,14 @@ namespace Mono.Unix {
                        return new UnixDirectoryInfo (path);
                }
 
+               [CLSCompliant (false)]
+               public static UnixDirectoryInfo CreateDirectory (string path, Native.FilePermissions mode)
+               {
+                       int r = Native.Syscall.mkdir (path, mode);
+                       UnixMarshal.ThrowExceptionForLastErrorIf (r);
+                       return new UnixDirectoryInfo (path);
+               }
+
                public static UnixDirectoryInfo CreateDirectory (string path)
                {
                        FilePermissions mode = FilePermissions.ACCESSPERMS;
@@ -71,16 +80,19 @@ namespace Mono.Unix {
                        return false;
                }
 
+               [Obsolete ("The return type of this method will change in the next release")]
                public static Dirent[] GetEntries (string path)
                {
                        return new UnixDirectoryInfo(path).GetEntries ();
                }
 
+               [Obsolete ("The return type of this method will change in the next release")]
                public static Dirent[] GetEntries (string path, Regex regex)
                {
                        return new UnixDirectoryInfo(path).GetEntries (regex);
                }
 
+               [Obsolete ("The return type of this method will change in the next release")]
                public static Dirent[] GetEntries (string path, string regex)
                {
                        return new UnixDirectoryInfo(path).GetEntries (regex);
@@ -101,6 +113,7 @@ namespace Mono.Unix {
                        return new UnixDirectoryInfo(path).GetFileSystemEntries (regex);
                }
 
+               [Obsolete ("The return type of this method will change in the next release")]
                public static Stat GetDirectoryStatus (string path)
                {
                        return UnixFile.GetFileStatus (path);