summaryrefslogtreecommitdiff
path: root/libpod/volume.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/volume.go')
-rw-r--r--libpod/volume.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index d60d978ed..f79ceaa87 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -255,3 +255,16 @@ func (v *Volume) IsDangling() (bool, error) {
func (v *Volume) UsesVolumeDriver() bool {
return !(v.config.Driver == define.VolumeDriverLocal || v.config.Driver == "")
}
+
+func (v *Volume) Mount() (string, error) {
+ v.lock.Lock()
+ defer v.lock.Unlock()
+ err := v.mount()
+ return v.config.MountPoint, err
+}
+
+func (v *Volume) Unmount() error {
+ v.lock.Lock()
+ defer v.lock.Unlock()
+ return v.unmount(false)
+}