File: nosymlink-unix.go

package info (click to toggle)
golang-github-hlandau-goutils 0.0~git20160722.0.0cdb66a-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 160 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 252 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
// +build linux freebsd openbsd netbsd dragonfly solaris darwin

package os

import (
	"os"
	"syscall"
)

func openFileNoSymlinks(path string, flags int, mode os.FileMode) (*os.File, error) {
	return os.OpenFile(path, flags|syscall.O_NOFOLLOW, mode)
}