grammar updates
[mono.git] / mono / metadata / file-io.h
index 061d35147cd68367e4579ff5522ef299595dd422..baa438abefbe7f05b5af7d605942f2e2e2fe5360 100644 (file)
@@ -59,79 +59,112 @@ typedef struct _MonoIOStat {
        gint64 last_write_time;
 } MonoIOStat;
 
-/* System.IO.MonoIO */
+/* This is a copy of System.IO.FileAttributes */
+typedef enum {
+       FileAttributes_ReadOnly=0x00001,
+       FileAttributes_Hidden=0x00002,
+       FileAttributes_System=0x00004,
+       FileAttributes_Directory=0x00010,
+       FileAttributes_Archive=0x00020,
+       FileAttributes_Device=0x00040,
+       FileAttributes_Normal=0x00080,
+       FileAttributes_Temporary=0x00100,
+       FileAttributes_SparseFile=0x00200,
+       FileAttributes_ReparsePoint=0x00400,
+       FileAttributes_Compressed=0x00800,
+       FileAttributes_Offline=0x01000,
+       FileAttributes_NotContentIndexed=0x02000,
+       FileAttributes_Encrypted=0x04000,
+       FileAttributes_MonoExecutable=0x80000000,
+} MonoFileAttributes;
 
-extern gint32 
-ves_icall_System_IO_MonoIO_GetLastError (void);
+/* System.IO.MonoIO */
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_CreateDirectory (MonoString *path);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_CreateDirectory (MonoString *path, gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_RemoveDirectory (MonoString *path);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_RemoveDirectory (MonoString *path, gint32 *error);
 
 extern HANDLE 
-ves_icall_System_IO_MonoIO_FindFirstFile (MonoString *path, MonoIOStat *stat);
+ves_icall_System_IO_MonoIO_FindFirstFile (MonoString *path, MonoIOStat *stat,
+                                         gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_FindNextFile (HANDLE find, MonoIOStat *stat);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_FindNextFile (HANDLE find, MonoIOStat *stat,
+                                        gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_FindClose (HANDLE find);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_FindClose (HANDLE find, gint32 *error);
 
 extern MonoString *
-ves_icall_System_IO_MonoIO_GetCurrentDirectory (void);
+ves_icall_System_IO_MonoIO_GetCurrentDirectory (gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_SetCurrentDirectory (MonoString *path);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_SetCurrentDirectory (MonoString *path,
+                                               gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_MoveFile (MonoString *path, MonoString *dest);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_MoveFile (MonoString *path, MonoString *dest,
+                                    gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_CopyFile (MonoString *path, MonoString *dest, gboolean overwrite);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_CopyFile (MonoString *path, MonoString *dest,
+                                    MonoBoolean overwrite, gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_DeleteFile (MonoString *path);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_DeleteFile (MonoString *path, gint32 *error);
 
 extern gint32 
-ves_icall_System_IO_MonoIO_GetFileAttributes (MonoString *path);
+ves_icall_System_IO_MonoIO_GetFileAttributes (MonoString *path, gint32 *error);
 
-extern gboolean
-ves_icall_System_IO_MonoIO_SetFileAttributes (MonoString *path, gint32 attrs);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_SetFileAttributes (MonoString *path, gint32 attrs,
+                                             gint32 *error);
 
 extern gint32
-ves_icall_System_IO_MonoIO_GetFileType (HANDLE handle);
+ves_icall_System_IO_MonoIO_GetFileType (HANDLE handle, gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_GetFileStat (MonoString *path, MonoIOStat *stat);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_GetFileStat (MonoString *path, MonoIOStat *stat,
+                                       gint32 *error);
 
 extern HANDLE 
-ves_icall_System_IO_MonoIO_Open (MonoString *filename, gint32 mode, gint32 access_mode, gint32 share);
+ves_icall_System_IO_MonoIO_Open (MonoString *filename, gint32 mode,
+                                gint32 access_mode, gint32 share,
+                                gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_Close (HANDLE handle);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_Close (HANDLE handle, gint32 *error);
 
 extern gint32 
-ves_icall_System_IO_MonoIO_Read (HANDLE handle, MonoArray *dest, gint32 dest_offset, gint32 count);
+ves_icall_System_IO_MonoIO_Read (HANDLE handle, MonoArray *dest,
+                                gint32 dest_offset, gint32 count,
+                                gint32 *error);
 
 extern gint32 
-ves_icall_System_IO_MonoIO_Write (HANDLE handle, MonoArray *src, gint32 src_offset, gint32 count);
+ves_icall_System_IO_MonoIO_Write (HANDLE handle, MonoArray *src,
+                                 gint32 src_offset, gint32 count,
+                                 gint32 *error);
 
 extern gint64 
-ves_icall_System_IO_MonoIO_Seek (HANDLE handle, gint64 offset, gint32 origin);
+ves_icall_System_IO_MonoIO_Seek (HANDLE handle, gint64 offset, gint32 origin,
+                                gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_Flush (HANDLE handle);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_Flush (HANDLE handle, gint32 *error);
 
 extern gint64 
-ves_icall_System_IO_MonoIO_GetLength (HANDLE handle);
+ves_icall_System_IO_MonoIO_GetLength (HANDLE handle, gint32 *error);
 
-extern gboolean 
-ves_icall_System_IO_MonoIO_SetLength (HANDLE handle, gint64 length);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_SetLength (HANDLE handle, gint64 length,
+                                     gint32 *error);
 
-extern gboolean
-ves_icall_System_IO_MonoIO_SetFileTime (HANDLE handle, gint64 creation_time, gint64 last_access_time, gint64 last_write_time);
+extern MonoBoolean
+ves_icall_System_IO_MonoIO_SetFileTime (HANDLE handle, gint64 creation_time,
+                                       gint64 last_access_time,
+                                       gint64 last_write_time, gint32 *error);
 
 extern HANDLE 
 ves_icall_System_IO_MonoIO_get_ConsoleOutput (void);
@@ -161,4 +194,7 @@ ves_icall_System_IO_MonoIO_get_PathSeparator (void);
 extern MonoArray *
 ves_icall_System_IO_MonoIO_get_InvalidPathChars (void);
 
+extern gint32
+ves_icall_System_IO_MonoIO_GetTempPath (MonoString **mono_name);
+
 #endif /* _MONO_METADATA_FILEIO_H_ */