Variant f_hphp_recursivedirectoryiterator_key(CObjRef obj) { RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); if (rdi->m_flags == KEY_AS_FILENAME) { return rdi->m_dirEntry; } return rdi->getPathName(); }
Object f_hphp_recursivedirectoryiterator_getchildren(CObjRef obj) { if (!f_hphp_recursivedirectoryiterator_haschildren(obj)) return Object(); RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); c_recursivedirectoryiterator *c_rdi = NEW(c_recursivedirectoryiterator)(); c_rdi->m_rsrc = NEW(RecursiveDirectoryIterator)(rdi->getPathName(), rdi->m_flags); return c_rdi; }
Object f_hphp_recursivedirectoryiterator_getchildren(CObjRef obj) { if (!f_hphp_recursivedirectoryiterator_haschildren(obj)) return Object(); RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); ObjectData* o_rdi = SystemLib::AllocRecursiveDirectoryIteratorObject(); o_rdi->o_set("rsrc", NEWOBJ(RecursiveDirectoryIterator)(rdi->getPathName(), rdi->m_flags), "SplFileInfo"); return o_rdi; }
Variant f_hphp_recursivedirectoryiterator_current(CObjRef obj) { RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); String pathName = rdi->getPathName(); if (rdi->m_flags & CURRENT_AS_PATHNAME) { return pathName; } if (rdi->m_flags & CURRENT_AS_FILEINFO) { return SystemLib::AllocSplFileInfoObject(pathName); } return obj; }
Variant f_hphp_recursivedirectoryiterator_current(CObjRef obj) { RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); String pathName = rdi->getPathName(); if (rdi->m_flags & HPHP::q_recursivedirectoryiterator_CURRENT_AS_PATHNAME) { return pathName; } if (rdi->m_flags & HPHP::q_recursivedirectoryiterator_CURRENT_AS_FILEINFO) { c_splfileinfo *c_splfi = NEW(c_splfileinfo)(); c_splfi->m_rsrc = NEW(SplFileInfo)(pathName); return c_splfi; } return obj; }
Variant f_hphp_recursivedirectoryiterator_current(CObjRef obj) { RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); String pathName = rdi->getPathName(); if (rdi->m_flags & HPHP::q_RecursiveDirectoryIterator$$CURRENT_AS_PATHNAME) { return pathName; } if (rdi->m_flags & HPHP::q_RecursiveDirectoryIterator$$CURRENT_AS_FILEINFO) { ObjectData* c_splfi = SystemLib::AllocSplFileInfoObject(); c_splfi->o_set("rsrc", NEWOBJ(SplFileInfo)(pathName), "SplFileInfo"); return c_splfi; } return obj; }
void f_hphp_recursivedirectoryiterator_next(CObjRef obj) { RecursiveDirectoryIterator *rdi = get_recursivedirectoryiterator(obj); rdi->next(); }