33 #include "../System/databuffer.h"
142 unsigned int flags = 0);
171 unsigned int flags = 0);
Generic write access.
Definition: file.h:70
bool open(const std::string &filename)
Opens a file read only.
I/O Device interface.
Definition: iodevice.h:50
Generic read write access.
Definition: file.h:73
Flags
Optimization Flags.
Definition: file.h:112
Open existing file and truncate it.
Definition: file.h:102
Allow others to delete the file.
Definition: file.h:86
ShareFlags
File sharing flags.
Definition: file.h:77
Allow others to open the file for reading.
Definition: file.h:80
File()
Constructs a file object.
static void write_text(const std::string &filename, const std::string &text, bool write_bom=false)
Saves an UTF-8 text string to file.
File I/O device.
Definition: file.h:41
Generic read access.
Definition: file.h:67
Create a new file. Fails if it already exists.
Definition: file.h:108
Open existing file. Fails if it does not exist.
Definition: file.h:99
All other sharing flags combined.
Definition: file.h:89
static std::string read_text(const std::string &filename)
Loads an UTF-8 text file into a string.
Allow others to open the file for writing.
Definition: file.h:83
Open file or create it if it does not exist.
Definition: file.h:96
OpenMode
File opening modes.
Definition: file.h:93
Create file, even if it already exists.
Definition: file.h:105
static DataBuffer read_bytes(const std::string &filename)
Loads an file into a byte buffer.
static void write_bytes(const std::string &filename, const DataBuffer &bytes)
Saves a byte buffer to file.
General purpose data buffer.
Definition: databuffer.h:42
AccessFlags
Access flags.
Definition: file.h:64