From 5a5a07c7fad31641d032a743e4e87ffb58ade17d Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 22 May 2026 22:10:19 +0800 Subject: Initial commit --- rola-vcs/src/bucket.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rola-vcs/src/bucket.rs (limited to 'rola-vcs/src/bucket.rs') 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 { + dir_search_prev(raw_path, DirSearchPattern::File(ROLA_BUCKET_CONFIG_FILE)) + } +} -- cgit