github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/client/allocdir/alloc_dir_darwin.go (about) 1 package allocdir 2 3 import ( 4 "os" 5 "syscall" 6 ) 7 8 // Hardlinks the shared directory. As a side-effect the shared directory and 9 // task directory must be on the same filesystem. 10 func (d *AllocDir) mountSharedDir(dir string) error { 11 return syscall.Link(d.SharedDir, dir) 12 } 13 14 func (d *AllocDir) unmountSharedDir(dir string) error { 15 return syscall.Unlink(dir) 16 } 17 18 // createSecretDir creates the secrets dir folder at the given path 19 func (d *AllocDir) createSecretDir(dir string) error { 20 return os.MkdirAll(dir, 0777) 21 } 22 23 // removeSecretDir removes the secrets dir folder 24 func (d *AllocDir) removeSecretDir(dir string) error { 25 return os.RemoveAll(dir) 26 } 27 28 // MountSpecialDirs mounts the dev and proc file system on the chroot of the 29 // task. It's a no-op on darwin. 30 func (d *AllocDir) MountSpecialDirs(taskDir string) error { 31 return nil 32 } 33 34 // unmountSpecialDirs unmounts the dev and proc file system from the chroot 35 func (d *AllocDir) unmountSpecialDirs(taskDir string) error { 36 return nil 37 }