github.com/hhrutter/nomad@v0.6.0-rc2.0.20170723054333-80c4b03f0705/client/allocdir/fs_solaris.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 // TODO solaris has support for tmpfs so use that 21 return os.MkdirAll(dir, 0777) 22 } 23 24 // removeSecretDir removes the secrets dir folder 25 func removeSecretDir(dir string) error { 26 return os.RemoveAll(dir) 27 }