2003-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.IO / MonoIO.cs
1 //
2 // System.IO.MonoIO.cs: static interface to native filesystem.
3 //
4 // Author:
5 //   Dan Lewis (dihlewis@yahoo.co.uk)
6 //   Dick Porter (dick@ximian.com)
7 //
8 // (C) 2002
9 //
10
11 using System;
12 using System.Runtime.CompilerServices;
13
14 // This is a heavily cut down version of the corlib class.  It's here
15 // because we're keeping extensions invisible, but
16 // System.Diagnostics.Process needs access to some of the
17 // functionality (and CVS can't do symlinks).
18
19 namespace System.IO
20 {
21         internal sealed class MonoIO {
22
23                 // handle methods
24
25                 [MethodImplAttribute (MethodImplOptions.InternalCall)]
26                 public extern static bool Close (IntPtr handle,
27                                                  out MonoIOError error);
28                 
29                 // console handles
30
31                 public extern static IntPtr ConsoleOutput {
32                         [MethodImplAttribute (MethodImplOptions.InternalCall)]
33                         get;
34                 }
35
36                 public extern static IntPtr ConsoleInput {
37                         [MethodImplAttribute (MethodImplOptions.InternalCall)]
38                         get;
39                 }
40
41                 public extern static IntPtr ConsoleError {
42                         [MethodImplAttribute (MethodImplOptions.InternalCall)]
43                         get;
44                 }
45
46                 // pipe handles
47
48                 [MethodImplAttribute (MethodImplOptions.InternalCall)]
49                 public extern static bool CreatePipe (out IntPtr read_handle, out IntPtr write_handle);
50         }
51 }
52