aboutsummaryrefslogtreecommitdiff
path: root/lib/dirstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dirstore.go')
-rw-r--r--lib/dirstore.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dirstore.go b/lib/dirstore.go
new file mode 100644
index 0000000..e7ebb77
--- /dev/null
+++ b/lib/dirstore.go
@@ -0,0 +1,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
+}