You can import symbolic mode constants (S_IF*) and functions (S_IS*) from the Fcntl module:
S_IFREG S_IFDIR S_IFLNK S_IFBLK S_ISCHR S_IFIFO S_IFSOCK S_IFWHT S_ENFMT
Figure the bitwise math out and create a hash lookup.
Cheers - L~R
In reply to Re: Re: Re: How to determine a file's type via stat()
by Limbic~Region
in thread How to determine a file's type via stat()
by draconis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |