system/FileDescriptor: add method Tell()

This commit is contained in:
Max Kellermann 2015-03-24 21:58:36 +01:00
parent 7f6e1fbc8d
commit 077e95da85
1 changed files with 5 additions and 0 deletions

View File

@ -146,6 +146,11 @@ public:
return lseek(Get(), offset, SEEK_SET);
}
gcc_pure
off_t Tell() const {
return lseek(Get(), 0, SEEK_CUR);
}
/**
* Returns the size of the file in bytes, or -1 on error.
*/