pub struct SteamRoot { /* private fields */ }Expand description
An existing steamroot folder with steamapps and steamruntime
Implementations§
Source§impl SteamRoot
impl SteamRoot
pub fn get_root(&self) -> PathBuf
Sourcepub fn get_steamapps_folder(&self) -> PathBuf
pub fn get_steamapps_folder(&self) -> PathBuf
The steamapps folder in the root directory of steam
Sourcepub fn get_install_library(&self, game_id: u32) -> Option<SteamLibrary>
pub fn get_install_library(&self, game_id: u32) -> Option<SteamLibrary>
Returns the library in which the game is installed. The game prefix data might be elsewhere (like with the Steamdeck SD-card libraries store compatdata still in the steamroot).
This is based on the libraryfolder.vdf file, which steam updates infrequently, meaning if you just moved the game it will still be noted with it’s old location (so this value is unfortunatly not that reliable)
Sourcepub fn get_prefix(&self, game_id: u32) -> Option<ProtonPrefix>
pub fn get_prefix(&self, game_id: u32) -> Option<ProtonPrefix>
Attempts to find the prefix for a given game via it’s game id
Sourcepub fn get_libraries(&self) -> Vec<SteamLibrary>
pub fn get_libraries(&self) -> Vec<SteamLibrary>
Returns you all libraries part of this steamroot This function always returns at least 1 result, that being the root library
Sourcepub fn read_library_folders_vdf_file(&self) -> Option<VdfStruct>
pub fn read_library_folders_vdf_file(&self) -> Option<VdfStruct>
Reads the libraryfolders file for this streamroot, returning on success the contained “libraryfolders” struct (so you can directly access the libraries).
This is in contrast to calling parse_vdf_file manually, which would give you the root
object that contains this struct under said key (so this function here saves you one step).