Add StoreId::new()
This commit is contained in:
parent
8dff5685fd
commit
fe73a53d44
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue