Class: RFuse::Filler
- Inherits:
-
Object
- Object
- RFuse::Filler
- Defined in:
- ext/rfuse/filler.c,
lib/rfuse.rb,
ext/rfuse/filler.c
Overview
Used by RFuse::Fuse#readdir to collect directory entries
Instance Method Summary collapse
- #initialize ⇒ Object constructor
-
#push(name, stat, offset) ⇒ Object
Add a value into the filler.
Constructor Details
#initialize ⇒ Object
5 6 7 |
# File 'ext/rfuse/filler.c', line 5 VALUE rfiller_initialize(VALUE self){ return self; } |
Instance Method Details
#push(name, stat, offset) ⇒ Object
Add a value into the filler
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'ext/rfuse/filler.c', line 28 VALUE rfiller_push(VALUE self, VALUE name, VALUE stat, VALUE offset) { struct filler_t *f; int result; Data_Get_Struct(self,struct filler_t,f); //Allow nil return instead of a stat if (NIL_P(stat)) { result = f->filler(f->buffer,StringValueCStr(name),NULL,NUM2OFFT(offset)); } else { struct stat st; memset(&st, 0, sizeof(st)); rstat2stat(stat,&st); result = f->filler(f->buffer,StringValueCStr(name),&st,NUM2OFFT(offset)); } return result ? Qnil : self; } |