| Crates.io | minecraft_folder_path |
| lib.rs | minecraft_folder_path |
| version | 0.1.2 |
| created_at | 2023-12-07 05:19:46.152573+00 |
| updated_at | 2023-12-07 05:26:44.064769+00 |
| description | Get the location of the user's .minecraft directory. |
| homepage | |
| repository | https://github.com/azalea-rs/minecraft_folder_path |
| max_upload_size | |
| id | 1060722 |
| size | 4,528 |
Get the location of the user's .minecraft directory.
Based on a JavaScript library of the same name.
This is primarily useful if you want to cache Minecraft-related data in the user's default Minecraft directory.
Note that they may have multiple .minecraft directories, or it may be somewhere else if they configured it to be.
// Windows: `%appdata%.minecraft`
// Mac: `$HOME/Library/Application Support/minecraft`
// Linux: `$HOME/.minecraft`
if let Some(minecraft_dir) = minecraft_folder_path::minecraft_dir() {
println!("{minecraft_dir}");
}