dirs-dev / directories-rs

a mid-level library that provides config/cache/data paths, following the respective conventions on Linux, macOS and Windows
https://dirs.dev
Apache License 2.0
752 stars 33 forks source link

Should something like temp_dir be added? #43

Open soc opened 6 years ago

soc commented 6 years ago

As far as I remember from the last time I looked into this, the problem was that operating systems had wildly different definitions of temp dirs and their usage.

sigoden commented 5 years ago

use std::env::temp_dir

soc commented 5 years ago

That there exists a function is not indicative that its semantics make sense (similar to std::env::home_dir).

Weasy666 commented 5 years ago

I am also in favor of integrating that into this crate. std::env::temp_dir currently doesn't include MacOS (or does that use the same temp folder as Linux? i don't think so) so there would be some value for doing it here. And...also...for sake of completeness it should be available here 😉