mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-16 11:30:32 +00:00
WIP
This commit is contained in:
parent
f34a2e0d2b
commit
a072d6d6e7
2 changed files with 13 additions and 9 deletions
6
check.go
6
check.go
|
@ -5,18 +5,18 @@ package mtree
|
|||
// If keywords is nil, the check all present in the DirectoryHierarchy
|
||||
//
|
||||
// This is equivalent to creating a new DirectoryHierarchy with Walk(root, nil,
|
||||
// keywords, fs) and then doing a Compare(dh, newDh, keywords).
|
||||
// keywords, fs) and then doing a Compare(dh, curDh, keywords).
|
||||
func Check(root string, dh *DirectoryHierarchy, keywords []Keyword, fs FsEval) ([]InodeDelta, error) {
|
||||
if keywords == nil {
|
||||
keywords = dh.UsedKeywords()
|
||||
}
|
||||
|
||||
newDh, err := Walk(root, nil, keywords, fs)
|
||||
curDh, err := Walk(root, nil, keywords, fs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return Compare(dh, newDh, keywords)
|
||||
return Compare(dh, curDh, keywords)
|
||||
}
|
||||
|
||||
// TarCheck is the tar equivalent of checking a file hierarchy spec against a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue