func (m *MountPoint) Setup() (string, error) {
	if m.Volume != nil {
		return m.Volume.Mount()
	}
	if len(m.Source) > 0 {
		if _, err := os.Stat(m.Source); err != nil {
			if !os.IsNotExist(err) {
				return "", err
			}
			if runtime.GOOS != "windows" {  
				logrus.Warnf("Auto-creating non-existant volume host path %s, this is deprecated and will be removed soon", m.Source)
				if err := system.MkdirAll(m.Source, 0755); err != nil {
					return "", err
				}
			}
		}
		return m.Source, nil
	}
	return "", derr.ErrorCodeMountSetup
}
Setup sets up a mount point by either mounting the volume if it is
configured, or creating the source directory if supplied.
package volume
import (
	"os"
	"runtime"
	"strings"
	"github.com/cloudcredo/cloudrocker/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
	derr "github.com/cloudcredo/cloudrocker/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/errors"
	"github.com/cloudcredo/cloudrocker/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system"
)
const DefaultDriverName string = "local"
type Driver interface {
	Name() string
	Create(name string, opts map[string]string) (Volume, error)
	Remove(Volume) error
}
type Volume interface {
	Name() string
	DriverName() string
	Path() string
	Mount() (string, error)
	Unmount() error
}
type MountPoint struct {
	Source      string  
	Destination string  
	RW          bool    
	Name        string  
	Driver      string  
	Volume      Volume `json:"-"`
	Mode string `json:"Relabel"`  
}