Documentation ¶
Index ¶
Constants ¶
View Source
const ( File = Label(iota) Conflict Directory Deleted )
View Source
const (
TRADB = ".trago.db"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TraDb ¶
func New ¶
New creates a new TraDb.
The replica ID is a random string, and the version number is set to 1. Checks for files in the current directory and stores relevant file state in a map.
func Parse ¶
Parse parses a TraDb structure. Fails if the given string is not in the correct format.
func ParseFile ¶
ParseFile parses a TraDb from the db file in the current directory. If the file doesn't exist, a new TraDb is created using New.
func (*TraDb) Compare ¶
Compare compares two TraDbs. Returns a TagList which gives the FileTag for each changed file.
func (*TraDb) Update ¶
Update looks for modified files in the current directory and updates the filemap accordingly.
func (*TraDb) UpdateMTimes ¶
func (*TraDb) WriteToFile ¶
WriteToFile writes a TraDb to the db file .trago.db.
Click to show internal directories.
Click to hide internal directories.