aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/file.cpp')
-rw-r--r--common/file.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 5fc4f9012b..9cf554646c 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -219,4 +219,14 @@ bool DumpFile::flush() {
int32 DumpFile::pos() const { return _handle->pos(); }
+bool DumpFile::seek(int32 offset, int whence) {
+ SeekableWriteStream *ws = dynamic_cast<SeekableWriteStream *>(_handle);
+ return ws ? ws->seek(offset, whence) : -1;
+}
+
+int32 DumpFile::size() const {
+ SeekableWriteStream *ws = dynamic_cast<SeekableWriteStream *>(_handle);
+ return ws ? ws->size() : -1;
+}
+
} // End of namespace Common