aboutsummaryrefslogtreecommitdiff
path: root/lib/dirstore.go
blob: e7ebb7728afe6c8eba682caf93ca192f485a920c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package lib

type DirStore struct {
	dirs []string
}

func NewDirStore() *DirStore {
	return &DirStore{
		dirs: make([]string, 0),
	}
}

func (store *DirStore) Update(dirs []string) {
	store.dirs = make([]string, len(dirs))
	copy(store.dirs, dirs)
}

func (store *DirStore) List() []string {
	return store.dirs
}