about summary refs log tree commit diff
path: root/library/std/src/sys/fs/unix.rs
diff options
context:
space:
mode:
authorNiklas Fiekas <niklas.fiekas@backscattering.de>2025-04-29 14:30:53 +0200
committerNiklas Fiekas <niklas.fiekas@backscattering.de>2025-09-03 20:43:38 +0200
commitc914c471b9d83f9e6c74b0e6c2c8044efd3a57dd (patch)
treeba2b5ba07ab64b051f487a7576cc91ec835c7fa8 /library/std/src/sys/fs/unix.rs
parent239e8b1b47b34120287ec36b33228c1e177f0c38 (diff)
downloadrust-c914c471b9d83f9e6c74b0e6c2c8044efd3a57dd.tar.gz
rust-c914c471b9d83f9e6c74b0e6c2c8044efd3a57dd.zip
Add `read_buf` equivalents for positioned reads
Adds the following items under the `read_buf_at` feature:

 - `std::os::unix::fs::FileExt::read_buf_at`
 - `std::os::unix::fs::FileExt::read_buf_exact_at`
 - `std::os::windows::fs::FileExt::seek_read_buf`
Diffstat (limited to 'library/std/src/sys/fs/unix.rs')
-rw-r--r--library/std/src/sys/fs/unix.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs
index b310db2dac4..30be6d445ff 100644
--- a/library/std/src/sys/fs/unix.rs
+++ b/library/std/src/sys/fs/unix.rs
@@ -1422,6 +1422,10 @@ impl File {
         self.0.read_buf(cursor)
     }
 
+    pub fn read_buf_at(&self, cursor: BorrowedCursor<'_>, offset: u64) -> io::Result<()> {
+        self.0.read_buf_at(cursor, offset)
+    }
+
     pub fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> {
         self.0.read_vectored_at(bufs, offset)
     }