From 4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 13 Feb 2012 21:47:03 +0000 Subject: Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cFile.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/cFile.h') diff --git a/source/cFile.h b/source/cFile.h index 674ce93a2..390847eaf 100644 --- a/source/cFile.h +++ b/source/cFile.h @@ -51,7 +51,7 @@ public: { fmRead, // Read-only. If the file doesn't exist, object will not be valid fmWrite, // Write-only. If the file already exists, it will be overwritten - fmReadWrite, // Read/write. If the file already exists, it will be left intact + fmReadWrite, // Read/write. If the file already exists, it will be left intact; writing will overwrite the data from the beginning } ; /// Simple constructor - creates an unopened file object, use Open() to open / create a real file @@ -83,6 +83,9 @@ public: /// Returns the size of file, in bytes, or -1 for failure; asserts if not open int GetSize(void) const; + /// Reads the file from current position till EOF into an AString; returns the number of bytes read or -1 for error + int ReadRestOfFile(AString & a_Contents); + private: #ifdef USE_STDIO_FILE FILE * m_File; -- cgit v1.2.3