]> git.saurik.com Git - apple/libc.git/blob - emulated/lchflags.3
Libc-1081.1.3.tar.gz
[apple/libc.git] / emulated / lchflags.3
1 .Dd Oct 31, 2005
2 .Dt LCHFLAGS 3
3 .Os
4 .Sh NAME
5 .Nm lchflags
6 .Nd set file flags
7 .Sh SYNOPSIS
8 .In sys/stat.h
9 .In unistd.h
10 .Ft int
11 .Fn lchflags "const char *path" "u_int flags"
12 .Sh DESCRIPTION
13 The file whose name is given by
14 .Fa path
15 has its flags changed to
16 .Fa flags .
17 See
18 .Xr chflags 2
19 for the values of the
20 .Fa flags .
21 .Pp
22 The
23 .Fn lchflags
24 call is like
25 .Fn chflags
26 except when the named file is a symbolic link,
27 in which case
28 .Fn lchflags
29 will change the flags of the link itself,
30 rather than the file it points to.
31 .Sh NOTE
32 Instead of being a system call,
33 .Fn lchflags
34 is emulated using
35 .Xr setattrlist 2 .
36 Not all file systems support
37 .Xr setattrlist 2 .
38 .Sh RETURN VALUES
39 Upon successful completion, a value of 0 is returned.
40 Otherwise, -1 is returned and the global variable
41 .Va errno
42 is set to indicate the error.
43 .Sh ERRORS
44 The
45 .Fn lchflags
46 call may return the same errors as
47 .Xr chflags 2
48 and
49 .Xr setattrlist 2 .
50 .Sh SEE ALSO
51 .Xr chflags 2 ,
52 .Xr setattrlist 2