#minecraft #directory #user #location #folder #cache #path

minecraft_folder_path

Get the location of the user's .minecraft directory

3 releases

0.1.2 Dec 7, 2023
0.1.1 Dec 7, 2023
0.1.0 Dec 7, 2023

#1394 in Filesystem

Download history 50/week @ 2024-07-21 49/week @ 2024-07-28 46/week @ 2024-08-04 51/week @ 2024-08-11 125/week @ 2024-08-18 61/week @ 2024-08-25 39/week @ 2024-09-01 32/week @ 2024-09-08 39/week @ 2024-09-15 45/week @ 2024-09-22 56/week @ 2024-09-29 18/week @ 2024-10-06 156/week @ 2024-10-13 130/week @ 2024-10-20 118/week @ 2024-10-27 158/week @ 2024-11-03

563 downloads per month
Used in 2 crates (via azalea-client)

Unlicense

4KB

minecraft folder path

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

No runtime deps