moadim 0.0.1

Moadim.io MCP/REST server for managing cron jobs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(serde::Serialize)]
pub struct FsLocation {
    pub server_root: Option<String>,
    pub server_exe_dir: Option<String>,
}

impl FsLocation {
    pub fn current() -> Self {
        Self {
            server_root: std::env::current_dir()
                .ok()
                .map(|p| p.to_string_lossy().into_owned()),
            server_exe_dir: std::env::current_exe()
                .ok()
                .and_then(|p| p.parent().map(|d| d.to_string_lossy().into_owned())),
        }
    }
}