blockdev?()
public
Returns true if the file is a block device, false if it isn’t or if the
operating system doesn’t support this feature.
File.stat("testfile").blockdev?
File.stat("/dev/hda1").blockdev?
Show source
static VALUE
rb_stat_b(VALUE obj)
{
if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
return Qfalse;
}