~kiwec/ke

ref: 842396976984e3cbd83251296dd90a46b9d53b3c ke/src/File.h -rw-r--r-- 394 bytes
84239697 — Wolf Clément Downgrade to C++17, avoid stdlib 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <string>
#include "Document.h"

class File {
public:
	Text m_text;

	/// Can be changed anytime
	std::string filename;

	/// true if the file was modified since last save
	bool modified;

	File(std::string filename) : filename(filename), modified(false) {
		open();
	}

	/// Open the file and load the lines
	void open();

	/// Save the lines to the file
	void save();
};