Debian Codegraph @

syscallx/xattr_darwin.go

raw symbols SCIP
1 package syscallx
2
3 /* This is the source file for syscallx_darwin_*.go, to regenerate run
4
5 ./generate
6
7 */
8
9 // cannot use dest []byte here because OS X getxattr really wants a
10 // NULL to trigger size probing, size==0 is not enough
11 //
12 //sys getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
13
14 func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
15 var destp *byte
16 if len(dest) > 0 {
17 destp = &dest[0]
18 }
19 return getxattr(path, attr, destp, len(dest), 0, 0)
20 }
21
22 //sys listxattr(path string, dest []byte, options int) (sz int, err error)
23
24 func Listxattr(path string, dest []byte) (sz int, err error) {
25 return listxattr(path, dest, 0)
26 }
27
28 //sys setxattr(path string, attr string, data []byte, position uint32, flags int) (err error)
29
30 func Setxattr(path string, attr string, data []byte, flags int) (err error) {
31 return setxattr(path, attr, data, 0, flags)
32 }
33
34 //sys removexattr(path string, attr string, options int) (err error)
35
36 func Removexattr(path string, attr string) (err error) {
37 return removexattr(path, attr, 0)
38 }