1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! cwd - Current Working Directory, a convenience crate
//!
//! Instead of copy-pasting this bit of code yet again when I need the fully qualified current
//! working directory, I decided to turn it into a convenience crate in the name of code reuse.
//!
//! ## Example
//!
//! ```
//! use cwd::cwd;
//!
//! fn main() {
//! println!("The current working directory is '{}'", cwd());
//! }
//! ```
use ;
/// Get the current working directory
///
/// # Parameters
///
/// None
///
/// # Returns
///
/// `String` is the current working directory.
///
/// *Note* This is best effort. If it can't find the fully qualified current working directory for
/// some reason, it will fallback to "."
///
/// # Example
///
/// ```
/// use cwd::cwd;
///
/// fn main() {
/// println!("The current working directory is '{}'", cwd());
/// }
/// ```