size(p1)
public
Returns the size of file_name.
Show source
/*
* call-seq:
* File.size(file_name) => integer
*
* Returns the size of <code>file_name</code>.
*/
static VALUE
rb_file_s_size(klass, fname)
VALUE klass, fname;
{
struct stat st;
if (rb_stat(fname, &st) < 0)
rb_sys_fail(StringValueCStr(fname));
return OFFT2NUM(st.st_size);
}