Commit 077e95da authored by Max Kellermann's avatar Max Kellermann

system/FileDescriptor: add method Tell()

parent 7f6e1fbc
......@@ -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.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment