}
}
-
- // For StdInputStream
- public int ReadStdInput(byte[] buffer, int offset, int count)
- {
- return ReadFile(StdinHandle, buffer, offset, count);
- }
-
- // For StdOutputStream
- public void FlushStdOutput(byte[] byteBuf)
- {
- FlushFile(StdoutHandle, byteBuf);
- }
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern int ReadFile(IntPtr handle, byte[] buffer, int offset, int count);
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern int WriteFile(IntPtr handle, byte[] buffer, int offset, int count);
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern int SetLengthFile(IntPtr handle, long length);
-
- public void FlushFile(IntPtr handle, byte[] byteBuf)
- {
- WriteFile(handle, byteBuf, 0, byteBuf.Length);
- }
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern IntPtr OpenFile(String path, FileMode mode, FileAccess access, FileShare share);
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern void CloseFile(IntPtr handle);
-
- [MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- public extern long SeekFile(IntPtr handle, long offset, SeekOrigin origin);
-
- public IntPtr CreateFile(string path, FileMode mode, FileAccess access, FileShare share)
- {
- return OpenFile(path, FileMode.CreateNew, access, share);
- }
-
[MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
public extern void DeleteFile(string path);
* from DateTime(1/1/1601 00:00 GMT))
*/
[MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- private extern bool GetFileTime(IntPtr handle, out long creat, out long lastaccess, out long lastwrite);
+ private extern static bool GetFileTime(IntPtr handle, out long creat, out long lastaccess, out long lastwrite);
[MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
- private extern bool SetFileTime(IntPtr handle, long creat, long lastaccess, long lastwrite);
+ private extern static bool SetFileTime(IntPtr handle, long creat, long lastaccess, long lastwrite);
public DateTime GetCreationTimeFile(string path)
{
return 0;
}
- public long FileLength(IntPtr handle)
- {
- return 0;
- }
-
// Private implementation details
[DllImport("monowrapper", EntryPoint="mono_wrapper_environ", CharSet=CharSet.Ansi)]
private unsafe static extern IntPtr _getEnviron();