Method: File.ftype
- Defined in:
- file.c
.ftype(file_name) ⇒ String
1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 |
# File 'file.c', line 1921
static VALUE
rb_file_s_ftype(VALUE klass, VALUE fname)
{
struct stat st;
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (lstat(StringValueCStr(fname), &st) == -1) {
rb_sys_fail_path(fname);
}
return rb_file_ftype(&st);
}
|