32 #include "../System/databuffer.h" 130 unsigned int flags = 0);
148 unsigned int flags = 0);
Generic write access.
Definition: file.h:63
Allow others to open the file for reading.
Definition: file.h:73
I/O Device interface.
Definition: iodevice.h:49
Generic read write access.
Definition: file.h:66
Open existing file and truncate it.
Definition: file.h:95
All other sharing flags combined.
Definition: file.h:82
static DataBuffer read_bytes(const std::string &filename)
Loads an file into a byte buffer.
bool open(const std::string &filename)
Opens a file read only.
AccessFlags
Access flags.
Definition: file.h:57
File I/O device.
Definition: file.h:40
Flags
Optimization Flags.
Definition: file.h:105
Create a new file. Fails if it already exists.
Definition: file.h:101
Allow others to delete the file.
Definition: file.h:79
static void write_bytes(const std::string &filename, const DataBuffer &bytes)
Saves a byte buffer to file.
Open existing file. Fails if it does not exist.
Definition: file.h:92
static std::string read_text(const std::string &filename)
Loads an UTF-8 text file into a string.
File()
Constructs a file object.
Create file, even if it already exists.
Definition: file.h:98
Open file or create it if it does not exist.
Definition: file.h:89
ShareFlags
File sharing flags.
Definition: file.h:70
Generic read access.
Definition: file.h:60
OpenMode
File opening modes.
Definition: file.h:86
General purpose data buffer.
Definition: databuffer.h:41
Allow others to open the file for writing.
Definition: file.h:76
static void write_text(const std::string &filename, const std::string &text, bool write_bom=false)
Saves an UTF-8 text string to file.