path2: Replace the path module outright

Remove the old path.
Rename path2 to path.
Update all clients for the new path.

Also make some miscellaneous changes to the Path APIs to help the
adoption process.
This commit is contained in:
Kevin Ballard 2013-09-26 17:21:59 -07:00
parent 6741241f40
commit 73d3d00ec4
63 changed files with 2501 additions and 2989 deletions

View file

@ -578,8 +578,8 @@ mod tests {
let mut prog = run_pwd(None);
let output = str::from_utf8(prog.finish_with_output().output);
let parent_dir = os::getcwd().normalize();
let child_dir = Path(output.trim()).normalize();
let parent_dir = os::getcwd();
let child_dir = Path::from_str(output.trim());
let parent_stat = parent_dir.stat().unwrap();
let child_stat = child_dir.stat().unwrap();
@ -592,11 +592,11 @@ mod tests {
fn test_change_working_directory() {
// test changing to the parent of os::getcwd() because we know
// the path exists (and os::getcwd() is not expected to be root)
let parent_dir = os::getcwd().dir_path().normalize();
let parent_dir = os::getcwd().dir_path();
let mut prog = run_pwd(Some(&parent_dir));
let output = str::from_utf8(prog.finish_with_output().output);
let child_dir = Path(output.trim()).normalize();
let child_dir = Path::from_str(output.trim());
let parent_stat = parent_dir.stat().unwrap();
let child_stat = child_dir.stat().unwrap();