Documentation ¶
Index ¶
- Constants
- func AddFolderSuffix(folder string) string
- func ChecksumCrc32(fileReader io.Reader) (uint32, error)
- func ChecksumFilesWithCheckInfo(root string, checkInfo map[string]*ChecksumInfo, files []string) error
- func CompareChecksumFiles(ctx context.Context, root string, checksumPath string) error
- func GenerateChecksumFile(ctx context.Context, folder string, checksumName string) (checkSumPath string, err error)
- func GenerateChecksumFileWithIgnore(ctx context.Context, folder string, checksumName string, ignores []string) (checkSumPath string, err error)
- func GenerateChecksumMd5File(ctx context.Context, checksumPath string) (checksumMd5Path string, err error)
- func GetCheckFileList(ctx context.Context, checkInfo map[string]*ChecksumInfo) []string
- func GetChecksumInfo(ctx context.Context, checksumPath string) (checkInfo map[string]*ChecksumInfo, err error)
- func IsChecksumFileValid(ctx context.Context, checksumPath, md5Path string) bool
- func PopulateFilePathsRecursively(ctx context.Context, folder string, ignores []string) ([]string, error)
- type ChecksumInfo
Constants ¶
View Source
const OS_FILE_R_W = 0666
Variables ¶
This section is empty.
Functions ¶
func ChecksumFilesWithCheckInfo ¶
func ChecksumFilesWithCheckInfo(root string, checkInfo map[string]*ChecksumInfo, files []string) error
func CompareChecksumFiles ¶
CompareChecksumFiles srcDir 校验目标文件夹 checksumPath 校验文件路径 ignores 忽略的文件
func GenerateChecksumFile ¶
func GenerateChecksumFile(ctx context.Context, folder string, checksumName string) (checkSumPath string, err error)
GenerateChecksumFile 生成checksum文件
func GenerateChecksumFileWithIgnore ¶ added in v1.1.19
func GenerateChecksumFileWithIgnore(ctx context.Context, folder string, checksumName string, ignores []string) (checkSumPath string, err error)
GenerateChecksumFileWithIgnore 在排除某些文件的基础上,生成checksum
func GenerateChecksumMd5File ¶
func GenerateChecksumMd5File(ctx context.Context, checksumPath string) (checksumMd5Path string, err error)
GenerateChecksumMd5File 生成checksum.md5文件
func GetCheckFileList ¶
func GetCheckFileList(ctx context.Context, checkInfo map[string]*ChecksumInfo) []string
func GetChecksumInfo ¶
func IsChecksumFileValid ¶
Types ¶
type ChecksumInfo ¶
func GetFileInfo ¶
func GetFileInfo(root, fileName string) (*ChecksumInfo, error)
Click to show internal directories.
Click to hide internal directories.