Method: EIO.stat
- Defined in:
- ext/eio/eio_ext.c
.stat('/path/file') {|s| ... } ⇒ EIO::Request
Works like Ruby’s stat. The callback will be called after the stat.
Examples
cb = Proc.new{|s| p s }
EIO.stat('/path/file', cb) => EIO::Request
EIO.stat('/path/file') => File::Stat
922 923 924 925 926 927 928 929 930 931 932 933 934 |
# File 'ext/eio/eio_ext.c', line 922 static VALUE rb_eio_s_stat(int argc, VALUE *argv, VALUE eio) { int ret; VALUE path, proc, cb; rb_scan_args(argc, argv, "11&", &path, &proc, &cb); AssertCallback(cb, 1); Check_Type(path, T_STRING); SyncRequest({ return rb_funcall(rb_cFile, sym_stat, 1, path); }); AsyncRequest(stat, rb_eio_stat_cb, StringValueCStr(path)); } |