From e98145ba554d9e8396dea96e466c14db10e988fc Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 10 May 2024 22:41:19 +0200 Subject: Crappy code fix 12/? --- launcher/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 launcher/src/lib.rs (limited to 'launcher/src/lib.rs') diff --git a/launcher/src/lib.rs b/launcher/src/lib.rs new file mode 100644 index 0000000..9e2ef8b --- /dev/null +++ b/launcher/src/lib.rs @@ -0,0 +1,16 @@ +use std::ffi::OsStr; +use std::path::PathBuf; + +pub enum AppData { + Folder(PathBuf), + Asar(PathBuf) +} + +impl AppData { + pub fn get_path(&self) -> &OsStr { + match self { + AppData::Folder(path) => path.as_ref(), + AppData::Asar(path) => path.as_ref() + } + } +} -- cgit