Debian Codegraph @

src/os/file_open_unix.go

raw
1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 //go:build unix || (js && wasm)
6
7 package os
8
9 import (
10 "internal/poll"
11 "syscall"
12 )
13
14 func open(path string, flag int, perm uint32) (int, poll.SysFile, error) {
15 fd, err := syscall.Open(path, flag, perm)
16 return fd, poll.SysFile{}, err
17 }