size(p1)
public
Returns the size of file_name.
file_name can be an IO object.
Show source
static VALUE
rb_file_s_size(VALUE klass, VALUE fname)
{
struct stat st;
if (rb_stat(fname, &st) < 0) {
FilePathValue(fname);
rb_sys_fail_path(fname);
}
return OFFT2NUM(st.st_size);
}