blob: 99bf0e8929a5a3aa5c3b165b90344511b48eec94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef DEF_FILESTREAM_CLASS_H
#define DEF_FILESTREAM_CLASS_H
#include <IStream.proto.h>
#include <OStream.proto.h>
#ifdef THIS_IS_MELON_KERNEL
#include <VFS/File.class.h>
#else
#include <Binding/File.class.h>
#endif
class FileIStream : public IStream {
private:
String read();
SimpleList<String> *m_filenames;
File *m_file;
u8int m_encoding;
FSNode m_start;
public:
FileIStream(const String &filename, u8int encoding = UE_UTF8, FSNode start = FSNode(0));
FileIStream(u8int encoding = UE_UTF8, FSNode start = FSNode(0));
~FileIStream();
void appendFile(const String &filename);
};
class FileOStream : public OStream {
private:
File *m_file;
u8int m_encoding;
public:
FileOStream(const String &filename, u8int mode, u8int encoding = UE_UTF8, FSNode start = FSNode(0));
~FileOStream();
void write(const String &s);
};
#endif
|