Method: LinuxStat::NFTW.count_files
- Defined in:
- ext/nftw/nftw.c
.count_files(rb_dir) ⇒ Object
163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'ext/nftw/nftw.c', line 163
VALUE getFilesCount(volatile VALUE obj, volatile VALUE rb_dir) {
TOTAL_FILES = 0 ;
int flags = FTW_PHYS ;
#ifdef FTW_CONTINUE
flags |= FTW_CONTINUE ;
#endif
if (nftw(StringValuePtr(rb_dir), countFiles, 20, flags) == -1)
return Qnil ;
return ULL2NUM(TOTAL_FILES) ;
}
|