return Create (mode);
}
+ [CLSCompliant (false)]
+ [Obsolete ("Use Create(Mono.Unix.Native.FilePermissions)")]
public UnixStream Create (FilePermissions mode)
{
int fd = Syscall.creat (FullPath, mode);
return new UnixStream (fd);
}
+ [CLSCompliant (false)]
+ public UnixStream Create (Native.FilePermissions mode)
+ {
+ int fd = Native.Syscall.creat (FullPath, mode);
+ if (fd < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ base.Refresh ();
+ return new UnixStream (fd);
+ }
+
+ [CLSCompliant (false)]
+ [Obsolete ("Use Open(Mono.Unix.Native.OpenFlags)")]
public UnixStream Open (OpenFlags flags)
{
int fd = Syscall.open (FullPath, flags);
return new UnixStream (fd);
}
+ [CLSCompliant (false)]
+ public UnixStream Open (Native.OpenFlags flags)
+ {
+ int fd = Native.Syscall.open (FullPath, flags);
+ if (fd < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ return new UnixStream (fd);
+ }
+
+ [CLSCompliant (false)]
+ [Obsolete ("Use Open(Mono.Unix.Native.OpenFlags,Mono.Unix.Native.FilePermissions)")]
public UnixStream Open (OpenFlags flags, FilePermissions mode)
{
int fd = Syscall.open (FullPath, flags, mode);
return new UnixStream (fd);
}
+ [CLSCompliant (false)]
+ public UnixStream Open (Native.OpenFlags flags, Native.FilePermissions mode)
+ {
+ int fd = Native.Syscall.open (FullPath, flags, mode);
+ if (fd < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ return new UnixStream (fd);
+ }
+
public UnixStream Open (FileMode mode)
{
OpenFlags flags = UnixConvert.ToOpenFlags (mode, FileAccess.ReadWrite);
return new UnixStream (fd);
}
+ [CLSCompliant (false)]
+ [Obsolete ("Use Open (System.IO.FileMode,System.IO.FileAccess,Mono.Unix.Native.FilePermissions)")]
public UnixStream Open (FileMode mode, FileAccess access, FilePermissions perms)
{
OpenFlags flags = UnixConvert.ToOpenFlags (mode, access);
return new UnixStream (fd);
}
+ [CLSCompliant (false)]
+ public UnixStream Open (FileMode mode, FileAccess access, Native.FilePermissions perms)
+ {
+ Native.OpenFlags flags = Native.NativeConvert.ToOpenFlags (mode, access);
+ int fd = Native.Syscall.open (FullPath, flags, perms);
+ if (fd < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ return new UnixStream (fd);
+ }
+
public UnixStream OpenRead ()
{
return Open (FileMode.Open, FileAccess.Read);