Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adler32Sum ¶
Adler32Sum calculates and returns the adler32 checksum for the file in the given path
Types ¶
type FileInfo ¶
type FileInfo interface {
Name() string
Size() int64
Mode() os.FileMode
Path() string
FileSystem() string
Inode() (uint64, error)
Fingerprint() (string, error) // Fingerprint of the files contents. Files with the same fingerpint hold the same data.
}
FileInfo groups information about a certain file
type FileOnDiskInfo ¶
type FileOnDiskInfo struct {
FileInfo FileInfo
InodeInfo InodeInfo
Fingerprint string // Fingerprint of the Inodes contents. Inodes with the same fingerpint hold the same data.
}
FileOnDiskInfo combines the information about a file, its filesystem storage place and its data
func GenerateFileOnDiskInfo ¶
func GenerateFileOnDiskInfo(fileInfo FileInfo, knownFingerprints map[string]string) (*FileOnDiskInfo, error)
GenerateFileOnDiskInfo calculates the fingerprint of the given FileInfo object and also collects inode information on it
type HashFunction ¶
HashFunction is the type of a function which reads a file and calculates a checksum on it
type InodeInfo ¶
type InodeInfo interface {
Address() string // Address of the Inode, unique to the running machine. Includes an identifier of the filesystem
}
InodeInfo represents all necessary information about the filesystem representation of a file (inodes on Unix)
func InodeInfoFromFileInfo ¶
InodeInfoFromFileInfo creates a new InodeInfo object from the information of the given FileInfo object