diff options
author | Max Kellermann <max@duempel.org> | 2015-03-24 21:58:36 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-24 21:59:34 +0100 |
commit | 077e95da852189601fcc156fda9ec8f4a64887cb (patch) | |
tree | 4a8af4d6feb2c092881908cec5c59ba1f4078054 /src/system | |
parent | 7f6e1fbc8d463308e374bb7d9b112cd9f452f76e (diff) | |
download | mpd-077e95da852189601fcc156fda9ec8f4a64887cb.tar.gz mpd-077e95da852189601fcc156fda9ec8f4a64887cb.tar.xz mpd-077e95da852189601fcc156fda9ec8f4a64887cb.zip |
system/FileDescriptor: add method Tell()
Diffstat (limited to 'src/system')
-rw-r--r-- | src/system/FileDescriptor.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/system/FileDescriptor.hxx b/src/system/FileDescriptor.hxx index c366f3cc0..75a76844c 100644 --- a/src/system/FileDescriptor.hxx +++ b/src/system/FileDescriptor.hxx @@ -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. */ |