acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
_.h
1#pragma once
2
3
4#include "acme/constant/filesystem.h"
5
6
7//#include "item.h"
8
9
10//#include "plain_text_file_options.h"
11
12
13//#include "stdio_file.h"
14
15inline bool IsDirSep(::wide_character ch)
16{
17
18 return (ch == '\\' || ch == '/');
19
20}
21
22
23
24CLASS_DECL_ACME ::i32 get_sync_io_error();
25CLASS_DECL_ACME void set_sync_io_error(::i32 iError);
26CLASS_DECL_ACME ::i32 get_generate_sync_io_error();
27CLASS_DECL_ACME void set_generate_sync_io_error(::i32 iError);
28
29
30
31
32
33
34namespace file
35{
36
37
38 class exception;
39
40
41 class insert_item;
42 class edit_file;
43 class enumerator;
44
45
46} // namespace file
47
48
49
50
51
52
53
54
55
56
57#define FIRST_VERSION 0
58
59
60#ifdef WINDOWS
61
62#define LINE_SEPARATOR "\r\n"
63
64#elif defined(__APPLE__)
65
66#define LINE_SEPARATOR "\r"
67
68#else
69
70#define LINE_SEPARATOR "\n"
71
72#endif
73
74#define STATIC_ASCII_STRING_LENGTH(x) (sizeof(x) - 1)
75
76
77
78
79
80
81
82
83class memory_base;
84
85// CLASS_DECL_ACME bool xxxfile_save_stra(const_char_pointer pszName, const string_array_base & stra);
86// CLASS_DECL_ACME bool xxxfile_load_stra(const_char_pointer pszName, string_array_base & stra, bool bAddEmpty = true);
87
88
89// CLASS_DECL_ACME bool xxxfile_put_contents(const ::file::path & path, const memory_base & memory);
90// CLASS_DECL_ACME ::i32_bool xxxfile_put_contents(const ::file::path & path, const_char_pointer contents);
91// CLASS_DECL_ACME bool xxxfile_as_memory(memory_base & memory, const ::file::path & path, memsize iReadAtMostByteCount = -1);
92// CLASS_DECL_ACME memsize xxxfile_as_memory(const ::file::path & path, void * p, memsize s);
93
94
95
96//template < typename N, enum_type t_etypeContainer >
97//class numeric_array;
98
99
100
101
102
103
104
105
106//CLASS_DECL_ACME string file_path_title(const ::file::path & path);
107//CLASS_DECL_ACME const_char_pointer file_path_name(const ::file::path & path);
108
109
110
111//CLASS_DECL_ACME ::file::path dir_ca2_module();
112
113//CLASS_DECL_ACME ::file::path dir_base_module();
114
115
116
117
118
119
120//#include "opened.h"
121
122//#include "exception.h"
123
124//#include "status.h"
125
126//#include "stream.h"
127
128//#include "opened.h"
129
130//#include "dir.h"
131
132//#include "composite.h"
133
134//#include "serializable.h"
135
136//#include "path.h"
137
138//#include "buffer.h"
139
140//#include "text_file.h"
141
142//#include "memory_file.h"
143
144//#include "string_buffer.h"
145
146//#include "text_stream.h"
147
148//#include "payload_stream.h"
149
150
151
152
153
154
155
156
157
158
159
160
161
162//#include "stdio_file.h"
163
164
165//#include "file_stream.h"
166
167
168
169
170
171namespace file
172{
173
174
175 using pos_type = filesize;
176 using off_type = filesize;
177
178
179 using iostate = ::file::e_iostate;
180 using seekdir = ::enum_seek;
181
182
183 class writable;
184 class file;
185
186}
187
188
189//#include "memory_file.h"
190
191
192//#include "byte_stream_memory_file.h"
193
194
195
196
197
198//#include "item_array.h"
199
200
201//#include "html_file.h"
202
203
204//#include "_papaya.h"
205
206
207
208namespace file
209{
210
211 //template < typename TRANSFER >
212 CLASS_DECL_ACME bool output(::file::file* pfileOut, const ::function < bool (::file::file* pfileOut, ::file::file* pfileIn) > & function, ::file::file* pfileIn);
213// {
214//
215// throw ::not_implemented();
216//
217// }
218
219
220} // namespace file
221
222
223
224
225
226//#include "listing_provider.h"
227
228
229//#include "folder.h"
230
231
232
233class byte2_stream;
Definition byte2_stream.h:25
Definition enumerator.h:14
Definition exception.h:13
Definition file.h:33
Definition streamable.h:38
Definition memory_base.h:92
Definition filesystem.h:16