2019-06-27 17:33:12 +00:00
|
|
|
package lib
|
|
|
|
|
|
|
|
type DirStore struct {
|
|
|
|
dirs []string
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewDirStore() *DirStore {
|
2019-07-04 16:31:27 +00:00
|
|
|
return &DirStore{}
|
2019-06-27 17:33:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (store *DirStore) Update(dirs []string) {
|
|
|
|
store.dirs = make([]string, len(dirs))
|
|
|
|
copy(store.dirs, dirs)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (store *DirStore) List() []string {
|
|
|
|
return store.dirs
|
|
|
|
}
|