diff --git a/src/io/FileDescriptor.hxx b/src/io/FileDescriptor.hxx index e31217e9a..c132a4e9c 100644 --- a/src/io/FileDescriptor.hxx +++ b/src/io/FileDescriptor.hxx @@ -257,6 +257,13 @@ public: */ void FullRead(std::span dest) const; +#ifndef _WIN32 + [[nodiscard]] + ssize_t WriteAt(off_t offset, std::span src) const noexcept { + return ::pwrite(fd, src.data(), src.size(), offset); + } +#endif + [[nodiscard]] ssize_t Write(std::span src) const noexcept { return ::write(fd, src.data(), src.size());