summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-13 23:19:17 +0200
committerCarl Hetherington <cth@carlh.net>2022-05-05 21:46:30 +0200
commit6387446a183cf99803beb1bc68af8788601b73ce (patch)
treef73077b20b1ad3235da68967f6b1e924a9f1662f /src/file.h
parent75002393c81ca0d26b07069e6f92e6f82753882f (diff)
Add checked_{read,write} from DoM.
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/file.h b/src/file.h
index 23204349..e0564cae 100644
--- a/src/file.h
+++ b/src/file.h
@@ -64,12 +64,16 @@ public:
/** fgets() wrapper */
char *gets(char *s, int size);
+ void checked_write(void const * ptr, size_t size);
+ void checked_read(void* ptr, size_t size);
+
/** Close the file; it is not necessary to call this as the
* destructor will do it if required.
*/
void close();
private:
+ boost::filesystem::path _path;
FILE* _file = nullptr;
};