lstat()
public
Show source
static VALUE
rb_file_lstat(VALUE obj)
{
rb_io_t *fptr;
struct stat st;
VALUE path;
rb_secure(2);
GetOpenFile(obj, fptr);
if (NIL_P(fptr->pathv)) return Qnil;
path = rb_str_encode_ospath(fptr->pathv);
if (lstat(RSTRING_PTR(path), &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
return stat_new(&st);
return rb_io_stat(obj);
}