Method: File.ftype
- Defined in:
- file.c
.ftype(file_name) ⇒ String
2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 |
# File 'file.c', line 2270
static VALUE
rb_file_s_ftype(VALUE klass, VALUE fname)
{
struct stat st;
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (lstat_without_gvl(StringValueCStr(fname), &st) == -1) {
rb_sys_fail_path(fname);
}
return rb_file_ftype(&st);
}
|