diff options
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/io/mod.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/uv/uvio.rs | 6 |
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) => { |
