/* * call-seq: * File.file?(file_name) => integer or nil * * Returns <code>nil</code> if <code>file_name</code> doesn't * exist or has zero size, the size of the file otherwise. */ static VALUE test_s(obj, fname) VALUE obj, fname; { struct stat st; if (rb_stat(fname, &st) < 0) return Qnil; if (st.st_size == 0) return Qnil; return OFFT2NUM(st.st_size); }