given inode and fs, determine if dir or not?

Ron Natalie ron at ron.rutgers.edu
Thu Nov 24 05:22:21 AEST 1988


I'm not sure what you mean by "I have an inode."  If you have the
inode, the you look at the IFMT bits for IFDIR.  Users don't normally
get "inodes."  What they can do is run "stat" on a file specification
or fstat on an open file descriptor and get returned the inode information
for that file.  Again you check the IFMT bits.

-Ron



More information about the Comp.unix.wizards mailing list