pub struct Am(/* private fields */);
Expand description
Handle to the Application Manager service.
Implementations§
source§impl Am
impl Am
sourcepub fn title_count(&self, mediatype: MediaType) -> Result<u32>
pub fn title_count(&self, mediatype: MediaType) -> Result<u32>
Returns the amount of titles currently installed in a specific install location.
§Example
use ctru::services::am::Am;
use ctru::services::fs::MediaType;
let app_manager = Am::new()?;
// Number of titles installed on the Nand storage.
let nand_count = app_manager.title_count(MediaType::Nand);
// Number of apps installed on the SD card storage
let sd_count = app_manager.title_count(MediaType::Sd);
sourcepub fn title_list(&self, mediatype: MediaType) -> Result<Vec<Title<'_>>>
pub fn title_list(&self, mediatype: MediaType) -> Result<Vec<Title<'_>>>
Returns the list of titles installed in a specific install location.
§Example
use ctru::services::am::Am;
use ctru::services::fs::MediaType;
let app_manager = Am::new()?;
// Number of apps installed on the SD card storage
let sd_titles = app_manager.title_list(MediaType::Sd)?;
// Unique product code identifier of the 5th installed title.
let product_code = sd_titles[4].product_code();