github.com/manicqin/nomad@v0.9.5/client/allocdir/fs_darwin.go (about) 1 package allocdir 2 3 import ( 4 "os" 5 "syscall" 6 ) 7 8 // linkDir hardlinks src to dst. The src and dst must be on the same filesystem. 9 func linkDir(src, dst string) error { 10 return syscall.Link(src, dst) 11 } 12 13 // unlinkDir removes a directory link. 14 func unlinkDir(dir string) error { 15 return syscall.Unlink(dir) 16 } 17 18 // createSecretDir creates the secrets dir folder at the given path 19 func createSecretDir(dir string) error { 20 return os.MkdirAll(dir, 0777) 21 } 22 23 // removeSecretDir removes the secrets dir folder 24 func removeSecretDir(dir string) error { 25 return os.RemoveAll(dir) 26 }