Skip to content

Commit

Permalink
Add std::process
Browse files Browse the repository at this point in the history
Per [RFC 579](rust-lang/rfcs#579), this commit
adds a new `std::process` module. This module is largely based on the
existing `std::old_io::process` module, but refactors the API to use
`OsStr` and other new standards set out by IO reform.

The existing module is not yet deprecated, to allow for the new API to
get a bit of testing before a mass migration to it.
  • Loading branch information
aturon committed Feb 14, 2015
1 parent 39b463f commit 4175f1c
Show file tree
Hide file tree
Showing 16 changed files with 2,051 additions and 36 deletions.
1 change: 1 addition & 0 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ pub mod os;
pub mod env;
pub mod path;
pub mod old_path;
pub mod process;
pub mod rand;
pub mod time;

Expand Down
5 changes: 5 additions & 0 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,11 @@ impl PathBuf {

true
}

/// Consume the `PathBuf`, yielding its internal `OsString` storage
pub fn into_os_string(self) -> OsString {
self.inner
}
}

impl<'a, P: ?Sized + 'a> iter::FromIterator<&'a P> for PathBuf where P: AsPath {
Expand Down
Loading

0 comments on commit 4175f1c

Please sign in to comment.