minecraft_folder_path 0.1.2

Get the location of the user's .minecraft directory.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 4.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • azalea-rs/minecraft_folder_path
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mat-1

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