Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMap ¶
FileMap is type for holding a map of files information indexed by their name (relative path).
func (FileMap) Diff ¶
func (f FileMap) Diff(other FileMap) (diff []FileOperation)
Diff compares the two filetrees and returns a list of differences (files to be removed, updated or created).
The differences are relative to the calling FileMap, which means that for example UploadFile opearion should transfer the file FROM the calling FileMap location to the other FileMap location.
type FileOperation ¶
type FileOperation struct { Path string Info os.FileInfo Type FileOperationType }
type FileOperationType ¶
type FileOperationType int64
FileOperationType is used to identify what kind of operation should be performed on a file.
const ( // UploadFile means that file should be uploaded (created). UploadFile FileOperationType = iota // UpdateFile means that file should be uploaded (modified). UpdateFile // RemoveFile means that file should be removed. RemoveFile )
Click to show internal directories.
Click to hide internal directories.