Method: File.ftype
- Defined in:
- file.c
.ftype(file_name) ⇒ String
2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 |
# File 'file.c', line 2295
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);
}
|