blob: a0cd5050de4723c101ab73395629d5cf8a7a0328 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef DEF_TEXTFILE_CLASS_H
#define DEF_TEXTFILE_CLASS_H
#include <VFS/File.class.h>
class TextFile : public File {
private:
u8int m_encoding;
public:
TextFile(u8int encoding = UE_UTF8) : File() { m_encoding = encoding; }
TextFile(String filename, u8int mode = FM_READ, FSNode* start = 0, u8int encoding = UE_UTF8)
: File(filename, mode, start) { m_encoding = encoding; }
~TextFile() {}
void setEncoding(u8int encoding = UE_UTF8) { m_encoding = encoding; }
bool write(String str, bool addnl = false); // Addnl = wether or not to add \n at end
String readLine(char separator = '\n');
};
#endif
|