summaryrefslogtreecommitdiff
path: root/rola-vcs/src/bucket.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rola-vcs/src/bucket.rs')
-rw-r--r--rola-vcs/src/bucket.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/rola-vcs/src/bucket.rs b/rola-vcs/src/bucket.rs
new file mode 100644
index 0000000..40de6f8
--- /dev/null
+++ b/rola-vcs/src/bucket.rs
@@ -0,0 +1,18 @@
+//! Bucket - Rorolala Storage Unit
+
+use crate::{
+ DirPtrData, DirSearchPattern, bucket::constants::ROLA_BUCKET_CONFIG_FILE, dir_search_prev,
+};
+
+pub mod constants {
+ /// The name of the bucket config file
+ pub const ROLA_BUCKET_CONFIG_FILE: &str = "rorolala.toml";
+}
+
+pub struct Bucket;
+
+impl DirPtrData for Bucket {
+ fn fix(raw_path: std::path::PathBuf) -> Option<std::path::PathBuf> {
+ dir_search_prev(raw_path, DirSearchPattern::File(ROLA_BUCKET_CONFIG_FILE))
+ }
+}