summaryrefslogtreecommitdiff
path: root/rola-vcs/src/bucket.rs
blob: 40de6f8fad04b250bbc38f2e572f52d0161fbd35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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))
    }
}