about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorJeff Olson <olson.jeffery@gmail.com>2013-09-16 13:24:23 -0700
committerJeff Olson <olson.jeffery@gmail.com>2013-09-16 23:19:23 -0700
commit25b4d8c1d7de70bab8eca8a57fdfb703e5e281c9 (patch)
tree49653c980597df25c1933c0635281bed5fdc2c03 /src/libstd
parent63182885d857fdf5641449a397ad7e3f4ebff8a7 (diff)
downloadrust-25b4d8c1d7de70bab8eca8a57fdfb703e5e281c9.tar.gz
rust-25b4d8c1d7de70bab8eca8a57fdfb703e5e281c9.zip
std: expose more stat info
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rt/io/mod.rs8
-rw-r--r--src/libstd/rt/uv/uvio.rs6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs
index 16c8a9deea0..afef369fa44 100644
--- a/src/libstd/rt/io/mod.rs
+++ b/src/libstd/rt/io/mod.rs
@@ -610,13 +610,10 @@ pub struct FileStat {
     /// `true` if the file pointed at by the `PathInfo` is a regular file
     is_file: bool,
     /// `true` if the file pointed at by the `PathInfo` is a directory
-    is_dir: bool
-    // `true` if the file pointed at by the `PathInfo` is a link (what this means
-    // is platform dependant)
-    /*
+    is_dir: bool,
     /// The file pointed at by the `PathInfo`'s size in bytes
     size: u64,
-    /// The file pointed at by the `PathInfo`'s time date in platform-dependent msecs
+    /// The file pointed at by the `PathInfo`'s creation time
     created: u64,
     /// The file pointed at by the `PathInfo`'s last-modification time in
     /// platform-dependent msecs
@@ -624,5 +621,4 @@ pub struct FileStat {
     /// The file pointed at by the `PathInfo`'s last-accessd time (e.g. read) in
     /// platform-dependent msecs
     accessed: u64,
-    */
 }
diff --git a/src/libstd/rt/uv/uvio.rs b/src/libstd/rt/uv/uvio.rs
index 88d168c85d2..d701a87004c 100644
--- a/src/libstd/rt/uv/uvio.rs
+++ b/src/libstd/rt/uv/uvio.rs
@@ -635,7 +635,11 @@ impl IoFactory for UvIoFactory {
                             Ok(FileStat {
                                 path: Path(path_str),
                                 is_file: stat.is_file(),
-                                is_dir: stat.is_dir()
+                                is_dir: stat.is_dir(),
+                                size: stat.st_size,
+                                created: stat.st_ctim.tv_sec as u64,
+                                modified: stat.st_mtim.tv_sec as u64,
+                                accessed: stat.st_atim.tv_sec as u64
                             })
                         },
                         Some(e) => {