From 8c55fcd1f2ef3674d4bda4e38e2e7cacdd7cd5b8 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 12 May 2014 02:31:22 -0300 Subject: 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] --- src/libstd/rt/rtio.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/rt') 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; } pub trait RtioProcess { -- cgit 1.4.1-3-g733a5