Add StoreId::new()

This commit is contained in:
Matthias Beyer 2016-08-07 16:54:36 +02:00
parent 8dff5685fd
commit fe73a53d44

View file

@ -21,6 +21,10 @@ pub struct StoreId {
impl StoreId { impl StoreId {
pub fn new(base: Option<PathBuf>, id: PathBuf) -> StoreId {
StoreId { base: base, id: id }
}
pub fn storified(self, store: &Store) -> StoreId { pub fn storified(self, store: &Store) -> StoreId {
if self.starts_with(store.path()) { if self.starts_with(store.path()) {
debug!("Not storifying {:?}, because it is already.", self); debug!("Not storifying {:?}, because it is already.", self);