summaryrefslogtreecommitdiffstats
path: root/qtools/qfile_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtools/qfile_unix.cpp')
-rw-r--r--qtools/qfile_unix.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp
index 6b63d99..fbf6acf 100644
--- a/qtools/qfile_unix.cpp
+++ b/qtools/qfile_unix.cpp
@@ -632,3 +632,24 @@ void QFile::close()
return;
}
+
+int64 QFile::pos() const
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return ftell( fh );
+ }
+ return -1;
+}
+
+bool QFile::seek( int64 pos )
+{
+ if (isOpen())
+ {
+ // TODO: support 64 bit size
+ return fseek( fh, pos, SEEK_SET )!=-1;
+ }
+ return FALSE;
+}
+