feat: add os module
This commit is contained in:
parent
45bd3650ea
commit
822910bb38
7 changed files with 164 additions and 3 deletions
41
examples/test/src/os.rs
Normal file
41
examples/test/src/os.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
use tauri_sys::os;
|
||||
|
||||
pub async fn arch() -> anyhow::Result<()> {
|
||||
let arch = os::arch().await?;
|
||||
|
||||
log::debug!("{:?}", arch);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn platform() -> anyhow::Result<()> {
|
||||
let platform = os::platform().await?;
|
||||
|
||||
log::debug!("{:?}", platform);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn tempdir() -> anyhow::Result<()> {
|
||||
let tempdir = os::tempdir().await?;
|
||||
|
||||
log::debug!("{:?}", tempdir);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn kind() -> anyhow::Result<()> {
|
||||
let kind = os::kind().await?;
|
||||
|
||||
log::debug!("{:?}", kind);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn version() -> anyhow::Result<()> {
|
||||
let version = os::version().await?;
|
||||
|
||||
log::debug!("{:?}", version);
|
||||
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue