From 58731200a835da9ec928577d36ab5232db974734 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 13 Apr 2022 23:37:19 +0200 Subject: Add ::seek(). --- src/file.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/file.cc') diff --git a/src/file.cc b/src/file.cc index f7c865b2..9ee91fe7 100644 --- a/src/file.cc +++ b/src/file.cc @@ -143,6 +143,18 @@ File::take() } +int +File::seek(int64_t offset, int whence) +{ + DCP_ASSERT(_file); +#ifdef LIBDCP_WINDOWS + return fseeki64(_file, offset, whence); +#else + return fseek(_file, offset, whence); +#endif +} + + /** Windows can't "by default" cope with paths longer than 260 characters, so if you pass such a path to * any boost::filesystem method it will fail. There is a "fix" for this, which is to prepend * the string \\?\ to the path. This will make it work, so long as: -- cgit v1.2.3