We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a086bc5 commit 51d52ceCopy full SHA for 51d52ce
src/appimage.rs
@@ -0,0 +1,31 @@
1
+use std::path::Path;
2
+
3
+use crate::error::{Error, Result};
4
5
+pub struct AppImage {
6
+ #[allow(dead_code)]
7
+ path: Box<Path>,
8
+}
9
10
+impl AppImage {
11
+ pub fn open<P: AsRef<Path>>(path: P) -> Result<Self> {
12
+ let path = path.as_ref();
13
14
+ if !path.exists() {
15
+ return Err(Error::AppImage(format!(
16
+ "File does not exist: {}",
17
+ path.display()
18
+ )));
19
+ }
20
21
+ if !path.is_file() {
22
+ return Err(Error::AppImage(format!("Not a file: {}", path.display())));
23
24
25
+ Ok(Self { path: path.into() })
26
27
28
+ pub fn read_update_info(&self) -> Result<String> {
29
+ todo!("Implement update info extraction from AppImage")
30
31
0 commit comments