1
0
Fork 0

Spectre/System/File: adding readString()

This commit is contained in:
Henrik Hautakoski 2022-09-25 16:31:45 +02:00
parent 99ae7f2236
commit c11d71aaaa
2 changed files with 18 additions and 0 deletions

View file

@ -88,6 +88,9 @@ public :
return read((void*) &buffer[0], s) == s;
}
// Read contents into str until null (\0)
size_t readString(std::string &str);
// Write data to file at the current position.
// Returns -1 if an error occured. Otherwice the number of bytes written is returned.
size_t write(const void *ptr, size_t size);