Example #1
0
func setUpSendReceiveFolder(model *Model) sendReceiveFolder {
	return sendReceiveFolder{
		folder: folder{
			stateTracker: newStateTracker("default"),
			model:        model,
		},

		mtimeFS:   fs.NewMtimeFS(db.NewNamespacedKV(model.db, "mtime")),
		dir:       "testdata",
		queue:     newJobQueue(),
		errors:    make(map[string]string),
		errorsMut: sync.NewMutex(),
	}
}
Example #2
0
func (s *FileSet) MtimeFS() *fs.MtimeFS {
	prefix := s.db.mtimesKey([]byte(s.folder))
	kv := NewNamespacedKV(s.db, string(prefix))
	return fs.NewMtimeFS(kv)
}