Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForChanges ¶
func CheckForChanges(previousFileMap map[string]FileData, file_added_chan, file_modified_chan, file_deleted_chan chan OutputData)
CheckForChanges detects if a file was added, modified, or deleted, and pushes the info through the channels given as input
func InitFileMap ¶
InitFileMap initiates a fileMap, representing the intial state of the watched directory
Types ¶
type FileData ¶
type FileData struct {
ModificationTime int64 `bson: "modificationTime"`
IsDir bool `bson: "isDir"`
Size int64 `bson: "size"`
}
FileData is used for the values of the hash map for fileMap
type OutputData ¶
type OutputData struct {
Path string `bson: "path"`
Is_dir bool `bson: "is_dir"`
Modification_time int64 `bson: "modification_time"`
Size int64 `bson: "size"`
}
OutputData is used as the communication of data in channels
func CheckForFilesToSendToServerOnInit ¶
func CheckForFilesToSendToServerOnInit(last_accessed int64) ([]OutputData, error)
CheckForFilesToSendToServerOnInit returns a list of files that need to be sent to the server to be updated.
Click to show internal directories.
Click to hide internal directories.