mirror of
https://github.com/vbatts/dedupe-linker.git
synced 2025-07-29 13:30:30 +00:00
reorg
This commit is contained in:
parent
0a054d3410
commit
842fa03b61
4 changed files with 220 additions and 177 deletions
24
base/base.go
Normal file
24
base/base.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package base
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func InitVarBase(base string) error {
|
||||
for _, path := range []string{"dedup/blobs", "dedup/state"} {
|
||||
if err := os.MkdirAll(filepath.Join(base, path), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Base struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
func (b Base) HasBlob(hashType crypto.Hash, sum string) bool {
|
||||
return true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue