File: android.rs

package info (click to toggle)
rust-app-dirs2 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 200 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 584 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![cfg(target_os = "android")]

use app_dirs2::*;
use log::info;

const NDK_APP_INFO: AppInfo = AppInfo {
    name: "unnecessary",
    author: "The Android NDK Authors",
};

#[cfg_attr(
    target_os = "android",
    ndk_glue::main(backtrace = "full", logger(level = "info", tag = "app_dirs2"))
)]
fn main() {
    let all = [
        AppDataType::UserConfig,
        AppDataType::UserData,
        AppDataType::UserCache,
        AppDataType::SharedConfig,
        AppDataType::SharedData,
    ];
    for t in all {
        info!("{:?}: {:?}", t, app_root(t, &NDK_APP_INFO));
    }
}