diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-29 19:22:54 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-29 19:22:54 +0000 |
commit | 1edb424b734ea3e4f2128e1cbc77a22bd001f8d5 (patch) | |
tree | da3e95edf1ab1a1808ac6673811f76610f9dfce2 /lib/common/FileStream.h | |
parent | 1ce71f487e6cd6514198c3769cd0a337395c1f8e (diff) |
Add a ToString method to IOStream and some subclasses.
Useful to help debug problems such as invalid file headers when the source
of the stream might not be too obvious.
Diffstat (limited to 'lib/common/FileStream.h')
-rw-r--r-- | lib/common/FileStream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/common/FileStream.h b/lib/common/FileStream.h index 9101a968..8489188c 100644 --- a/lib/common/FileStream.h +++ b/lib/common/FileStream.h @@ -49,6 +49,10 @@ public: virtual bool StreamClosed(); bool CompareWith(IOStream& rOther, int Timeout = IOStream::TimeOutInfinite); + std::string ToString() const + { + return std::string("local file ") + mFileName; + } private: tOSFileHandle mOSFileHandle; |