File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -350,12 +350,24 @@ impl File {
350350 }
351351
352352 /// Reads a number of bytes starting from a given offset.
353+ ///
354+ /// The offset is relative to the file start and thus independent from the
355+ /// current cursor.
356+ ///
357+ /// Note that similar to `File::read`, it is not an error to return a short
358+ /// read.
353359 #[ unstable( feature = "file_offset" , issue = "0" ) ]
354360 pub fn read_offset ( & self , buf : & mut [ u8 ] , offset : u64 ) -> io:: Result < usize > {
355361 self . inner . read_offset ( buf, offset)
356362 }
357363
358364 /// Writes a number of bytes starting from a given offset.
365+ ///
366+ /// The offset is relative to the file start and thus independent from the
367+ /// current cursor.
368+ ///
369+ /// Note that similar to `File::write`, it is not an error to return a
370+ /// short write.
359371 #[ unstable( feature = "file_offset" , issue = "0" ) ]
360372 pub fn write_offset ( & self , buf : & [ u8 ] , offset : u64 ) -> io:: Result < usize > {
361373 self . inner . write_offset ( buf, offset)
You can’t perform that action at this time.
0 commit comments