Re: Value of st_flags returned by stat() when no flags are set
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Fri, Jan 22, 2010 at 14:32, rohan a <info1686@gmail.com> wrote:
Hello All, I am using the stat() API to fetch the BSD flags (chflags) set on a file. There are several flag types like arch, hidden, nodump opaque etc. All of these have certain values associated with them defined in </usr/include/sys/stat.h> What value would be stored in st_flags when there are no flags set on a file ?When I printed the value I got "flags = 0x0" I can use the value 0x0 to know that there are no flags set on the file. But I do not want to hard code such a value. The stat.h file does not define any value for this. What should I do in this case ?I am writing an example program to print flags set on a file.
0x0 (ie, zero expressed in hexadecimal) by definition means 'no flags'. it's a pretty safe bet that you'll be able to rely on this for the foreseeable future. M. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Mo McRoberts