]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/toolutil/filestrm.h
ICU-8.11.1.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / filestrm.h
CommitLineData
b75a7d8f
A
1/*
2******************************************************************************
3*
73c04bcf 4* Copyright (C) 1997-2005, International Business Machines
b75a7d8f
A
5* Corporation and others. All Rights Reserved.
6*
7******************************************************************************
8*
9* File FILESTRM.H
10*
11* Contains FileStream interface
12*
13* @author Glenn Marcy
14*
15* Modification History:
16*
17* Date Name Description
18* 5/8/98 gm Created.
19* 03/02/99 stephen Reordered params in ungetc to match stdio
20* Added wopen
21*
22******************************************************************************
23*/
24
25#ifndef FILESTRM_H
26#define FILESTRM_H
27
b75a7d8f 28#include "unicode/utypes.h"
b75a7d8f
A
29
30typedef struct _FileStream FileStream;
31
32U_CAPI FileStream* U_EXPORT2
33T_FileStream_open(const char* filename, const char* mode);
34
35/*
36U_CAPI FileStream* U_EXPORT2
37T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode);
38*/
39U_CAPI void U_EXPORT2
40T_FileStream_close(FileStream* fileStream);
41
42U_CAPI UBool U_EXPORT2
43T_FileStream_file_exists(const char* filename);
44
45/*
46U_CAPI FileStream* U_EXPORT2
47T_FileStream_tmpfile(void);
48*/
49
50U_CAPI int32_t U_EXPORT2
51T_FileStream_read(FileStream* fileStream, void* addr, int32_t len);
52
53U_CAPI int32_t U_EXPORT2
54T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len);
55
56U_CAPI void U_EXPORT2
57T_FileStream_rewind(FileStream* fileStream);
58
59/*Added by Bertrand A. D. */
60U_CAPI char * U_EXPORT2
61T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length);
62
63U_CAPI int32_t U_EXPORT2
64T_FileStream_writeLine(FileStream* fileStream, const char* buffer);
65
66U_CAPI int32_t U_EXPORT2
67T_FileStream_putc(FileStream* fileStream, int32_t ch);
68
69U_CAPI int U_EXPORT2
70T_FileStream_getc(FileStream* fileStream);
71
72U_CAPI int32_t U_EXPORT2
73T_FileStream_ungetc(int32_t ch, FileStream *fileStream);
74
75U_CAPI int32_t U_EXPORT2
76T_FileStream_peek(FileStream* fileStream);
77
78U_CAPI int32_t U_EXPORT2
79T_FileStream_size(FileStream* fileStream);
80
81U_CAPI int U_EXPORT2
82T_FileStream_eof(FileStream* fileStream);
83
84U_CAPI int U_EXPORT2
85T_FileStream_error(FileStream* fileStream);
86
87/*
88U_CAPI void U_EXPORT2
89T_FileStream_setError(FileStream* fileStream);
90*/
91
92U_CAPI FileStream* U_EXPORT2
93T_FileStream_stdin(void);
94
95U_CAPI FileStream* U_EXPORT2
96T_FileStream_stdout(void);
97
98U_CAPI FileStream* U_EXPORT2
99T_FileStream_stderr(void);
100
101U_CAPI UBool U_EXPORT2
102T_FileStream_remove(const char* fileName);
b75a7d8f 103
73c04bcf 104#endif /* _FILESTRM*/