about summary refs log tree commit diff
path: root/src/libstd/rt/io
diff options
context:
space:
mode:
authorZiad Hatahet <hatahet@gmail.com>2013-10-22 18:25:07 -0700
committerZiad Hatahet <hatahet@gmail.com>2013-10-22 18:25:07 -0700
commit60245b9290388671edac86d6db1619f60a9ccb68 (patch)
treeb2014dac3d775c584a6319df198b58b0cbdca0b9 /src/libstd/rt/io
parentb477f7a7b74615bba9ab3074082f9cc76a24e8a3 (diff)
Remove thread-blocking call to `libc::stat` in `Path::stat`
Fixes #9958
Diffstat (limited to 'src/libstd/rt/io')
-rw-r--r--src/libstd/rt/io/file.rs4
-rw-r--r--src/libstd/rt/io/mod.rs6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs
index a5d593d2454..e25b03be361 100644
--- a/src/libstd/rt/io/file.rs
+++ b/src/libstd/rt/io/file.rs
@@ -59,8 +59,8 @@ use path::Path;
 ///     }).inside {
 ///         let stream = match open(p, Create, ReadWrite) {
 ///             Some(s) => s,
-///             None => fail!("whoops! I'm sure this raised, anyways..");
-///         }
+///             None => fail!("whoops! I'm sure this raised, anyways..")
+///         };
 ///         // do some stuff with that stream
 ///
 ///         // the file stream will be closed at the end of this block
diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs
index c0971b5d3cd..97d44da765a 100644
--- a/src/libstd/rt/io/mod.rs
+++ b/src/libstd/rt/io/mod.rs
@@ -654,6 +654,12 @@ pub struct FileStat {
     is_file: bool,
     /// `true` if the file pointed at by the `PathInfo` is a directory
     is_dir: bool,
+    /// The file pointed at by the `PathInfo`'s device
+    device: u64,
+    /// The file pointed at by the `PathInfo`'s mode
+    mode: u64,
+    /// The file pointed at by the `PathInfo`'s inode
+    inode: u64,
     /// The file pointed at by the `PathInfo`'s size in bytes
     size: u64,
     /// The file pointed at by the `PathInfo`'s creation time