1
0
Fork 0
forked from mirrors/tar-split
This commit is contained in:
Vincent Batts 2015-08-11 21:59:23 -04:00
parent e2a62d6b0d
commit 5c8d5cacba
13 changed files with 265 additions and 50 deletions

34
tar/verify/verify.go Normal file
View file

@ -0,0 +1,34 @@
package verify
import "fmt"
// CheckType is how the on disk attributes will be verified against the
// recorded header information
type CheckType int
// Check types for customizing how fuzzy or strict on-disk verification will be
// handled
const (
CheckDigest CheckType = iota
CheckFileSize
CheckFileMode
CheckFileUser
CheckFileGroup
CheckFileMtime
CheckFileDevice
CheckFileLink
CheckFileCaps
)
var (
// DefaultChecks is the default for verfication steps against each
// storage.VerficationEntry
DefaultChecks = CheckDigest | CheckFileAttributes
// CheckFileAttributes are the group of file attribute checks done
CheckFileAttributes = CheckFileSize | CheckFileMode | CheckFileUser |
CheckFileGroup | CheckFileMtime | CheckFileDevice | CheckFileCaps |
CheckFileLink
// ErrNotSupportedPlatform is when the platform does not support given features
ErrNotSupportedPlatform = fmt.Errorf("platform does not support this feature")
)