Lines Matching defs:advice
8255 int advice;
8262 return posix_fadvise(ptr->fd, ptr->offset, ptr->len, ptr->advice);
8302 do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
8308 num_adv = io_advise_sym_to_const(advice);
8318 ias.advice = NUM2INT(num_adv);
8335 advice_arg_check(VALUE advice)
8337 if (!SYMBOL_P(advice))
8338 rb_raise(rb_eTypeError, "advice must be a Symbol");
8340 if (advice != sym_normal &&
8341 advice != sym_sequential &&
8342 advice != sym_random &&
8343 advice != sym_willneed &&
8344 advice != sym_dontneed &&
8345 advice != sym_noreuse) {
8346 VALUE symname = rb_inspect(advice);
8347 rb_raise(rb_eNotImpError, "Unsupported advice: %s",
8354 * ios.advise(advice, offset=0, len=0) -> nil
8362 * * :normal - No advice to give; the default assumption for an open file.
8370 * The semantics of a piece of advice are platform-dependent. See
8376 * _len_ are 0, meaning that the advice applies to the entire file.
8396 VALUE advice, offset, len;
8400 rb_scan_args(argc, argv, "12", &advice, &offset, &len);
8401 advice_arg_check(advice);
8410 return do_io_advise(fptr, advice, off, l);