We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa5143f commit 811d5b4Copy full SHA for 811d5b4
library/std/src/fs.rs
@@ -795,6 +795,11 @@ impl Seek for File {
795
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
796
self.inner.seek(pos)
797
}
798
+
799
+ fn stream_len(&mut self) -> io::Result<u64> {
800
+ let file_attr = self.inner.file_attr()?;
801
+ Ok(file_attr.size())
802
+ }
803
804
#[stable(feature = "rust1", since = "1.0.0")]
805
impl Read for &File {
@@ -851,6 +856,10 @@ impl Seek for &File {
851
856
852
857
853
858
859
860
861
862
854
863
855
864
865
impl OpenOptions {
0 commit comments