mirror of
https://github.com/jiangcuo/nix.git
synced 2026-01-22 05:32:16 +00:00
add unistd::getcwd and unistd::mkdir As a (late) followup of [this withdrawn PR](https://github.com/rust-lang/libc/pull/326) I have added getcwd (wrapper around `libc::getcwd`) and mkdir (wrapper around `libc::mkdir`) and added testing. A few notes: - I'm new to rust so I would appreciate some pair of eyes testing the code, plus I'm open for revision of code or general remarks about my coding style - I have run the tests both on OSX as on Linux (Ubuntu) - I've run `clippy` to see if my code is well formatted, however clippy issues many warnings about the project. I think I didn't add any more warnings - the methods in unistd are not documented so I also left out the documentation of `getcwd` and `mkdir`, although I think it'd probably be good to add some documentation, especially some example code how to use the methods - the base idea of `getcwd` is [taken from std](https://github.com/rust-lang/rust/blob/1.9.0/src/libstd/sys/unix/os.rs#L95-L119), should I mention that somewhere? |
||
|---|---|---|
| .. | ||
| sys | ||
| test_fcntl.rs | ||
| test_mount.rs | ||
| test_mq.rs | ||
| test_net.rs | ||
| test_nix_path.rs | ||
| test_poll.rs | ||
| test_sendfile.rs | ||
| test_signalfd.rs | ||
| test_stat.rs | ||
| test_unistd.rs | ||
| test.rs | ||