SETFLAGS(3)

NAME
getflags, setflags - modify file flag bits

LIBRARY
libc

SYNOPSIS
#include <unistd.h>
char *
getflags(u_long flags, char *def);
int
setflags(char **stringp, u_long *setp, u_long *clrp);

DESCRIPTION
The getflags() function returns a comma separated string of the file flags represented by flags. If no flags are set the string def is returned instead.

The setflags() function takes a string of file flags, as described in chflags(1), parses it, and returns the 'set' flags and 'clear' flags such as would be given as arguments to chflags(2). On success setflags() returns 0, otherwise it returns non-zero and stringp is left pointing to the offending token.

SEE ALSO
chflags(1), chflags(2),

HISTORY
The getflags() and setflags() functions first appeared in FreeBSD 4.0.