directory?(p1)
public
Returns true if the named file is a directory, or a symlink that points at a directory, and
false otherwise.
file_name can be an IO object.
File.directory?(".")
Show source
VALUE
rb_file_directory_p(VALUE obj, VALUE fname)
{
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
if (S_ISDIR(st.st_mode)) return Qtrue;
return Qfalse;
}