about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-05-12 02:31:22 -0300
committerAlex Crichton <alex@alexcrichton.com>2014-05-12 19:52:29 -0700
commit8c55fcd1f2ef3674d4bda4e38e2e7cacdd7cd5b8 (patch)
tree26e430f86234c4be047df9369327942a4d0861c7 /src/libstd/rt
parentf096516d2b5e0ac1a634742a11520dff4b59014b (diff)
downloadrust-8c55fcd1f2ef3674d4bda4e38e2e7cacdd7cd5b8.tar.gz
rust-8c55fcd1f2ef3674d4bda4e38e2e7cacdd7cd5b8.zip
Add `stat` method to `std::io::fs::File` to stat without a Path.
The `FileStat` struct contained a `path` field, which was filled by the
`stat` and `lstat` function. Since this field isn't in fact returned by
the operating system (it was copied from the paths passed to the
functions) it was removed, as in the `fstat` case we aren't working with
a `Path`, but directly with a fd.

If your code used the `path` field of `FileStat` you will now have to
manually store the path passed to `stat` along with the returned struct.

[breaking-change]
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/rtio.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs
index bc3a483f30d..d23d327d558 100644
--- a/src/libstd/rt/rtio.rs
+++ b/src/libstd/rt/rtio.rs
@@ -269,6 +269,7 @@ pub trait RtioFileStream {
     fn fsync(&mut self) -> IoResult<()>;
     fn datasync(&mut self) -> IoResult<()>;
     fn truncate(&mut self, offset: i64) -> IoResult<()>;
+    fn fstat(&mut self) -> IoResult<FileStat>;
 }
 
 pub trait RtioProcess {