Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
A Directory represents a physical directory on the file system. files and dirs contain only the immediate child objects. The files and dirs fields map from the file's / dir's name to its corresponding File/Directory object.
func ScanDirectory ¶
ScanDirectory returns the pointer to a (hierarchically-nested) Directory that is constructed from recursively walking the directory located at absoluteRootPath.
func (*Directory) Add ¶
func (d *Directory) Add(relativeRemainingPath string, relativePath string, absoluteRootPath string, fileType FileType, filesystemImpl afero.Fs) error
Add adds the file or directory located at absoluteRootPath/relativePath to the correct Directory object. relativeRemainingPath is a helper argument, used to traverse down the Directory object hierarchy, and must initially be set to the same value as relativePath. If fileType is not(!) TypeDir, the SHA-1 checksum is computed
func (*Directory) ComputeDirectoryChecksums ¶
ComputeDirectoryChecksums recursively computes the "checksum" field of all Directory objects, and returns the checksum of the object this method is called on. It assumes that the checksum of all files(!) have already been computed.
func (*Directory) PrintChecksums ¶
type Ordered ¶
type Ordered interface { string }
See https://stackoverflow.com/questions/18342784/how-to-iterate-through-a-map-in-golang-in-order