00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef FILESTRM_H
00026 #define FILESTRM_H
00027
00028 #ifndef _UTYPES
00029 #include "unicode/utypes.h"
00030 #endif
00031
00032 typedef struct _FileStream FileStream;
00033
00034 U_CAPI FileStream* U_EXPORT2
00035 T_FileStream_open(const char* filename, const char* mode);
00036
00037 U_CAPI FileStream* U_EXPORT2
00038 T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode);
00039
00040 U_CAPI void U_EXPORT2
00041 T_FileStream_close(FileStream* fileStream);
00042
00043 U_CAPI UBool U_EXPORT2
00044 T_FileStream_file_exists(const char* filename);
00045
00046
00047 U_CAPI FileStream* U_EXPORT2
00048 T_FileStream_tmpfile(void);
00049
00050 U_CAPI int32_t U_EXPORT2
00051 T_FileStream_read(FileStream* fileStream, void* addr, int32_t len);
00052
00053 U_CAPI int32_t U_EXPORT2
00054 T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len);
00055
00056 U_CAPI void U_EXPORT2
00057 T_FileStream_rewind(FileStream* fileStream);
00058
00059
00060 U_CAPI char * U_EXPORT2
00061 T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length);
00062
00063 U_CAPI int32_t U_EXPORT2
00064 T_FileStream_writeLine(FileStream* fileStream, const char* buffer);
00065
00066 U_CAPI int32_t U_EXPORT2
00067 T_FileStream_putc(FileStream* fileStream, int32_t ch);
00068
00069 U_CAPI int U_EXPORT2
00070 T_FileStream_getc(FileStream* fileStream);
00071
00072 U_CAPI int32_t U_EXPORT2
00073 T_FileStream_ungetc(int32_t ch, FileStream *fileStream);
00074
00075 U_CAPI int32_t U_EXPORT2
00076 T_FileStream_peek(FileStream* fileStream);
00077
00078 U_CAPI int32_t U_EXPORT2
00079 T_FileStream_size(FileStream* fileStream);
00080
00081 U_CAPI int U_EXPORT2
00082 T_FileStream_eof(FileStream* fileStream);
00083
00084 U_CAPI int U_EXPORT2
00085 T_FileStream_error(FileStream* fileStream);
00086
00087 U_CAPI void U_EXPORT2
00088 T_FileStream_setError(FileStream* fileStream);
00089
00090 U_CAPI FileStream* U_EXPORT2
00091 T_FileStream_stdin(void);
00092
00093 U_CAPI FileStream* U_EXPORT2
00094 T_FileStream_stdout(void);
00095
00096 U_CAPI FileStream* U_EXPORT2
00097 T_FileStream_stderr(void);
00098
00099 #endif
00100
00101
00102
00103