use sys::platform::fs::MetadataExt as UnixMetadataExt;
/// Unix-specific extensions to `File`
-#[unstable(feature = "file_offset", issue = "35918")]
+#[stable(feature = "file_offset", since = "1.15.0")]
pub trait FileExt {
/// Reads a number of bytes starting from a given offset.
///
///
/// Note that similar to `File::read`, it is not an error to return with a
/// short read.
- #[unstable(feature = "file_offset", issue = "35918")]
+ #[stable(feature = "file_offset", since = "1.15.0")]
fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize>;
/// Writes a number of bytes starting from a given offset.
///
/// Note that similar to `File::write`, it is not an error to return a
/// short write.
- #[unstable(feature = "file_offset", issue = "35918")]
+ #[stable(feature = "file_offset", since = "1.15.0")]
fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize>;
}
-#[unstable(feature = "file_offset", issue = "35918")]
+#[stable(feature = "file_offset", since = "1.15.0")]
impl FileExt for fs::File {
fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
self.as_inner().read_at(buf, offset)