stdlib: added getcwd and a convenience function to make relative paths absolute. This will be helpful for #441.

This commit is contained in:
Eric Holk
2011-06-17 11:12:51 -07:00
parent 175fd8ee73
commit a40116b398
7 changed files with 69 additions and 2 deletions

View File

@@ -72,6 +72,14 @@ fn waitpid(int pid) -> int {
assert (os::libc::waitpid(pid, vec::buf(status), 0) != -1);
ret status.(0);
}
native "rust" mod rustrt {
fn rust_getcwd() -> str;
}
fn getcwd() -> str { ret rustrt::rust_getcwd(); }
// Local Variables:
// mode: rust;
// fill-column: 78;