Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#fadvise(offset, len, advice) ⇒ Object
do all the same error checking.
Instance Method Details
#fadvise(offset, len, advice) ⇒ Object
do all the same error checking
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'ext/fadvise.c', line 54
static VALUE File_fadvise(VALUE self, VALUE offset, VALUE len, VALUE advice){
int fd;
int madvice;
int i;
fd=NUM2INT(rb_funcall(self,rb_intern("fileno"),0));
madvice=SYM2ID(advice);
for (i=0; i<6; ++i){
if(madvice == symbols[i]) return self;
}
rb_raise(rb_Errno_EINVAL,":%s is not valid advice",rb_id2name(SYM2ID(advice)));
return self;
}
|