Wrapper.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /*
  2. * Generated automatically: do not edit this file.
  3. */
  4. using System;
  5. using System.Runtime.InteropServices;
  6. namespace System.Private {
  7. [CLSCompliant(false)]
  8. public struct stat {
  9. public uint st_dev;
  10. public uint st_mode;
  11. public uint st_nlink;
  12. public uint st_uid;
  13. public uint st_gid;
  14. public long st_size;
  15. public uint st_atime;
  16. public uint st_mtime;
  17. public uint st_ctime;
  18. };
  19. public class Wrapper {
  20. public const int SEEK_SET = 0;
  21. public const int SEEK_CUR = 1;
  22. public const int SEEK_END = 2;
  23. public const int O_RDONLY = 0x00000000;
  24. public const int O_WRONLY = 0x00000001;
  25. public const int O_RDWR = 0x00000002;
  26. public const int O_CREAT = 0x00000040;
  27. public const int O_EXCL = 0x00000080;
  28. public const int O_NOCTTY = 0x00000100;
  29. public const int O_TRUNC = 0x00000200;
  30. public const int O_SYNC = 0x00001000;
  31. public const int O_APPEND = 0x00000400;
  32. public const int STDIN_FILENO = 0x00000000;
  33. public const int STDOUT_FILENO = 0x00000001;
  34. public const int STDERR_FILENO = 0x00000002;
  35. public const int S_IFMT = 0x0000f000;
  36. public const int S_IFSOCK = 0x0000c000;
  37. public const int S_IFLNK = 0x0000a000;
  38. public const int S_IFREG = 0x00008000;
  39. public const int S_IFBLK = 0x00006000;
  40. public const int S_IFDIR = 0x00004000;
  41. public const int S_IFCHR = 0x00002000;
  42. public const int S_IFIFO = 0x00001000;
  43. public const int S_ISUID = 0x00000800;
  44. public const int S_ISGID = 0x00000400;
  45. public const int S_ISVTX = 0x00000200;
  46. public const int S_IRWXU = 0x000001c0;
  47. public const int S_IRUSR = 0x00000100;
  48. public const int S_IWUSR = 0x00000080;
  49. public const int S_IXUSR = 0x00000040;
  50. public const int S_IRWXG = 0x00000038;
  51. public const int S_IRGRP = 0x00000020;
  52. public const int S_IWGRP = 0x00000010;
  53. public const int S_IXGRP = 0x00000008;
  54. public const int S_IRWXO = 0x00000007;
  55. public const int S_IROTH = 0x00000004;
  56. public const int S_IWOTH = 0x00000002;
  57. public const int S_IXOTH = 0x00000001;
  58. public const int EPERM = 1;
  59. public const int ENOENT = 2;
  60. public const int ESRCH = 3;
  61. public const int EINTR = 4;
  62. public const int EIO = 5;
  63. public const int ENXIO = 6;
  64. public const int E2BIG = 7;
  65. public const int ENOEXEC = 8;
  66. public const int EBADF = 9;
  67. public const int ECHILD = 10;
  68. public const int EAGAIN = 11;
  69. public const int ENOMEM = 12;
  70. public const int EACCES = 13;
  71. public const int EFAULT = 14;
  72. public const int ENOTBLK = 15;
  73. public const int EBUSY = 16;
  74. public const int EEXIST = 17;
  75. public const int EXDEV = 18;
  76. public const int ENODEV = 19;
  77. public const int EISDIR = 21;
  78. public const int EINVAL = 22;
  79. public const int ENFILE = 23;
  80. public const int EMFILE = 24;
  81. public const int ENOTTY = 25;
  82. public const int ETXTBSY = 26;
  83. public const int EFBIG = 27;
  84. public const int ENOSPC = 28;
  85. public const int ESPIPE = 29;
  86. public const int EROFS = 30;
  87. public const int EMLINK = 31;
  88. public const int EPIPE = 32;
  89. public const int EDOM = 33;
  90. public const int ERANGE = 34;
  91. public const int EDEADLK = 35;
  92. public const int ENAMETOOLONG = 36;
  93. public const int ENOLCK = 37;
  94. public const int ENOSYS = 38;
  95. public const int ENOTEMPTY = 39;
  96. public const int ELOOP = 40;
  97. public const int EWOULDBLOCK = 11;
  98. public const int ENOMSG = 42;
  99. public const int EIDRM = 43;
  100. public const int ECHRNG = 44;
  101. public const int EL2NSYNC = 45;
  102. public const int EL3HLT = 46;
  103. public const int EL3RST = 47;
  104. public const int ELNRNG = 48;
  105. public const int EUNATCH = 49;
  106. public const int ENOCSI = 50;
  107. public const int EL2HLT = 51;
  108. public const int EBADE = 52;
  109. public const int EBADR = 53;
  110. public const int EXFULL = 54;
  111. public const int ENOANO = 55;
  112. public const int EBADRQC = 56;
  113. public const int EBADSLT = 57;
  114. public const int EDEADLOCK = 35;
  115. public const int EBFONT = 59;
  116. public const int ENOSTR = 60;
  117. public const int ENODATA = 61;
  118. public const int ETIME = 62;
  119. public const int ENOSR = 63;
  120. public const int ENONET = 64;
  121. public const int ENOPKG = 65;
  122. public const int EREMOTE = 66;
  123. public const int ENOLINK = 67;
  124. public const int EADV = 68;
  125. public const int ESRMNT = 69;
  126. public const int ECOMM = 70;
  127. public const int EPROTO = 71;
  128. public const int EMULTIHOP = 72;
  129. public const int EDOTDOT = 73;
  130. public const int EBADMSG = 74;
  131. public const int ENOTUNIQ = 76;
  132. public const int EBADFD = 77;
  133. public const int EREMCHG = 78;
  134. public const int ELIBACC = 79;
  135. public const int ELIBBAD = 80;
  136. public const int ELIBSCN = 81;
  137. public const int ELIBMAX = 82;
  138. public const int ELIBEXEC = 83;
  139. public const int EUSERS = 87;
  140. public const int ENOTSOCK = 88;
  141. public const int EDESTADDRREQ = 89;
  142. public const int EMSGSIZE = 90;
  143. public const int EPROTOTYPE = 91;
  144. public const int ENOPROTOOPT = 92;
  145. public const int EPROTONOSUPPORT = 93;
  146. public const int ESOCKTNOSUPPORT = 94;
  147. public const int EOPNOTSUPP = 95;
  148. public const int EPFNOSUPPORT = 96;
  149. public const int EAFNOSUPPORT = 97;
  150. public const int EADDRINUSE = 98;
  151. public const int EADDRNOTAVAIL = 99;
  152. public const int ENETDOWN = 100;
  153. public const int ENETUNREACH = 101;
  154. public const int ENETRESET = 102;
  155. public const int ECONNABORTED = 103;
  156. public const int ECONNRESET = 104;
  157. public const int ENOBUFS = 105;
  158. public const int EISCONN = 106;
  159. public const int ENOTCONN = 107;
  160. public const int ESHUTDOWN = 108;
  161. public const int ETOOMANYREFS = 109;
  162. public const int ETIMEDOUT = 110;
  163. public const int ECONNREFUSED = 111;
  164. public const int EHOSTDOWN = 112;
  165. public const int EHOSTUNREACH = 113;
  166. public const int EALREADY = 114;
  167. public const int EINPROGRESS = 115;
  168. public const int ESTALE = 116;
  169. public const int EDQUOT = 122;
  170. public const int ENOMEDIUM = 123;
  171. public const int ENOTDIR = 20;
  172. [DllImport("monowrapper", EntryPoint="mono_wrapper_seek", CharSet=CharSet.Ansi)]
  173. public unsafe static extern long seek (IntPtr fd, long offset, int whence);
  174. [DllImport("monowrapper", EntryPoint="mono_wrapper_mkdir", CharSet=CharSet.Ansi)]
  175. public unsafe static extern int mkdir (string path, int mode);
  176. [DllImport("monowrapper", EntryPoint="mono_wrapper_rmdir", CharSet=CharSet.Ansi)]
  177. public unsafe static extern int rmdir (string path);
  178. [DllImport("monowrapper", EntryPoint="mono_wrapper_read", CharSet=CharSet.Ansi)]
  179. [CLSCompliant(false)]
  180. public unsafe static extern int read (IntPtr fd, void * buf, int count);
  181. [DllImport("monowrapper", EntryPoint="mono_wrapper_write", CharSet=CharSet.Ansi)]
  182. [CLSCompliant(false)]
  183. public unsafe static extern int write (IntPtr fd, void * buf, int count);
  184. [DllImport("monowrapper", EntryPoint="mono_wrapper_fstat", CharSet=CharSet.Ansi)]
  185. [CLSCompliant(false)]
  186. public unsafe static extern int fstat (IntPtr fd, stat * buf);
  187. [DllImport("monowrapper", EntryPoint="mono_wrapper_ftruncate", CharSet=CharSet.Ansi)]
  188. public unsafe static extern int ftruncate (IntPtr fd, long length);
  189. [DllImport("monowrapper", EntryPoint="mono_wrapper_open", CharSet=CharSet.Ansi)]
  190. public unsafe static extern IntPtr open (string path, int flags, int mode);
  191. [DllImport("monowrapper", EntryPoint="mono_wrapper_close", CharSet=CharSet.Ansi)]
  192. public unsafe static extern int close (IntPtr fd);
  193. [DllImport("monowrapper", EntryPoint="mono_wrapper_stat", CharSet=CharSet.Ansi)]
  194. [CLSCompliant(false)]
  195. public unsafe static extern int stat (string path, stat * buf);
  196. [DllImport("monowrapper", EntryPoint="mono_wrapper_unlink", CharSet=CharSet.Ansi)]
  197. public unsafe static extern int unlink (string path);
  198. [DllImport("monowrapper", EntryPoint="mono_wrapper_opendir", CharSet=CharSet.Ansi)]
  199. public unsafe static extern IntPtr opendir (string path);
  200. [DllImport("monowrapper", EntryPoint="mono_wrapper_readdir", CharSet=CharSet.Ansi)]
  201. public unsafe static extern string readdir (IntPtr dir);
  202. [DllImport("monowrapper", EntryPoint="mono_wrapper_closedir", CharSet=CharSet.Ansi)]
  203. public unsafe static extern int closedir (IntPtr dir);
  204. [DllImport("monowrapper", EntryPoint="mono_wrapper_getenv", CharSet=CharSet.Ansi)]
  205. public unsafe static extern IntPtr getenv (string variable);
  206. [DllImport("monowrapper", EntryPoint="mono_wrapper_environ", CharSet=CharSet.Ansi)]
  207. public unsafe static extern IntPtr environ ();
  208. [DllImport("monowrapper", EntryPoint="mono_wrapper_rename", CharSet=CharSet.Ansi)]
  209. public unsafe static extern int rename (string source, string target);
  210. [DllImport("monowrapper", EntryPoint="mono_wrapper_utime", CharSet=CharSet.Ansi)]
  211. public unsafe static extern int utime (string path, int atime, int mtime);
  212. }
  213. }