Implement more native file I/O

This implements a fair amount of the unimpl() functionality in io::native
relating to filesystem operations. I've also modified all io::fs tests to run in
both a native and uv environment (so everything is actually tested).

There are a two bits of remaining functionality which I was unable to get
working:

* change_file_times on windows
* lstat on windows

I think that change_file_times may just need a better interface, but lstat has a
large implementation in libuv which I didn't want to tackle trying to copy.
This commit is contained in:
Alex Crichton
2013-11-13 14:48:45 -08:00
parent f5f5d5aac7
commit 68d5510292
9 changed files with 1099 additions and 759 deletions

View File

@@ -316,12 +316,22 @@ impl Writer for StdWriter {
#[cfg(test)]
mod tests {
use super::*;
use rt::test::run_in_newsched_task;
#[test]
fn smoke() {
fn smoke_uv() {
// Just make sure we can acquire handles
stdin();
stdout();
stderr();
}
#[test]
fn smoke_native() {
do run_in_newsched_task {
stdin();
stdout();
stderr();
}
}
}