use std::path::PathBuf;
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "linux")]
use linux as os;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "macos")]
use macos as os;
#[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))]
mod bsd;
#[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))]
use bsd as os;
#[cfg(any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "netbsd",
target_os = "macos"
))]
mod nix;
#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
use windows as os;
#[inline]
pub fn get_executable_path() -> Option<PathBuf> {
os::get_executable_path()
}
#[inline]
pub fn get_dylib_path() -> Option<PathBuf> {
#[cfg(target_os = "windows")]
{
os::get_dylib_path()
}
#[cfg(not(target_os = "windows"))]
{
nix::get_dylib_path()
}
}