s_isdir#

True if a stat-mode value names a directory.

Synopsis#

my $mode = (stat $path)[2];
print "directory\n" if S_ISDIR($mode);

Returns 1 when $mode & S_IFMT == S_IFDIR, 0 otherwise. With no argument, returns 0.