1use std::path::PathBuf;
4
5use browser_locations_core::{
6 Browser, discover_browser, locate_any_latest, locate_any_stable, locate_browser,
7};
8pub use browser_locations_core::{BrowserLocation, LocateError, ReleaseChannel};
9
10pub fn locate(channel: ReleaseChannel) -> Result<BrowserLocation, LocateError> {
16 locate_browser(Browser::Arc, channel)
17}
18
19#[must_use]
21pub fn discover() -> Vec<BrowserLocation> {
22 discover_browser(Browser::Arc)
23}
24
25pub fn get_arc_path() -> Result<PathBuf, LocateError> {
27 locate(ReleaseChannel::Default).map(|location| location.path)
28}
29
30pub fn get_any_arc_stable() -> Result<PathBuf, LocateError> {
36 locate_any_stable(Browser::Arc).map(|location| location.path)
37}
38
39pub fn get_any_arc_latest() -> Result<PathBuf, LocateError> {
45 locate_any_latest(Browser::Arc).map(|location| location.path)
46}