summaryrefslogtreecommitdiffstats
path: root/lib/model/folder.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-27 23:10:33 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-27 23:10:33 +0200
commit330cffa06c3efea42a42ca8e908b8b24db6bba3f (patch)
tree84e444d3ab66a1b8334c9c94f853a384ae34de84 /lib/model/folder.go
parent0805255ee01103c500f2aae8845850b3dae6a0b6 (diff)
Wait folder insync before sending exit event.
By default wait folder insync. Set ExitImmediate param to true to send exit event immedialty without waiting folder synchronization.
Diffstat (limited to 'lib/model/folder.go')
-rw-r--r--lib/model/folder.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/model/folder.go b/lib/model/folder.go
index e461f9c..fa94409 100644
--- a/lib/model/folder.go
+++ b/lib/model/folder.go
@@ -98,3 +98,13 @@ func (c *Folder) DeleteFolder(id string) (xdsconfig.FolderConfig, error) {
return fld, err
}
+
+// ForceSync Force the synchronization of a folder
+func (c *Folder) ForceSync(id string) error {
+ return c.SThg.FolderScan(id, "")
+}
+
+// IsFolderInSync Returns true when folder is in sync
+func (c *Folder) IsFolderInSync(id string) (bool, error) {
+ return c.SThg.IsFolderInSync(id)
+}