cwd

Crates.iocwd
lib.rscwd
version1.1.6
sourcesrc
created_at2022-04-05 10:06:48.54224
updated_at2023-02-19 13:51:41.702311
descriptionCurrent Working Directory, a convenience crate
homepagehttps://crates.io/crates/cwd
repositoryhttps://github.com/alfiedotwtf/cwd
max_upload_size
id562510
size3,965
gatekeepers (github:rust-vmm:gatekeepers)

documentation

https://docs.rs/cwd/

README

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());
}

Caveats

This is best effort. If it can't find the fully qualified current working directory for some reason, it will fallback to "."

Support

Please report any bugs or feature requests at:

Feel free to fork the repository and submit pull requests :)

Слава Україні!

Author

Alfie John <alfie@alfie.wtf>

Warranty

IT COMES WITHOUT WARRANTY OF ANY KIND.

Copyright and License

Copyright (C) 2023 by Alfie John

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Commit count: 5

cargo fmt