aboutsummaryrefslogtreecommitdiff
path: root/rust/libnewsboat-ffi/src/filepath.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/libnewsboat-ffi/src/filepath.rs')
-rw-r--r--rust/libnewsboat-ffi/src/filepath.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/libnewsboat-ffi/src/filepath.rs b/rust/libnewsboat-ffi/src/filepath.rs
index 65ed82b8..602c3fa2 100644
--- a/rust/libnewsboat-ffi/src/filepath.rs
+++ b/rust/libnewsboat-ffi/src/filepath.rs
@@ -19,6 +19,7 @@ mod bridged {
fn create_empty() -> Box<PathBuf>;
fn create(filepath: Vec<u8>) -> Box<PathBuf>;
fn equals(lhs: &PathBuf, rhs: &PathBuf) -> bool;
+ fn less_than(lhs: &PathBuf, rhs: &PathBuf) -> bool;
fn into_bytes(filepath: &PathBuf) -> Vec<u8>;
fn display(filepath: &PathBuf) -> String;
fn push(filepath: &mut PathBuf, component: &PathBuf);
@@ -44,6 +45,10 @@ fn equals(lhs: &PathBuf, rhs: &PathBuf) -> bool {
lhs.0 == rhs.0
}
+fn less_than(lhs: &PathBuf, rhs: &PathBuf) -> bool {
+ lhs.0 < rhs.0
+}
+
fn into_bytes(filepath: &PathBuf) -> Vec<u8> {
filepath.0.as_os_str().as_bytes().to_owned()
}