protected function scanForFiles($dir) { $result = lmbFs::findRecursive($dir, $types = 'f', $include_regex = '#.ph(tml|p)$#is'); foreach ($result as $name) { $this->_found_files[] = $name; } }
function getCacheSize() { $files = lmbFs::findRecursive($this->storage_dir, 'f'); $size = 0; foreach ($files as $file) { $size += filesize($file); } return $size; }
function testFindRecursive() { $this->_createFileSystem(); $res = lmbFs::findRecursive(LIMB_VAR_DIR . '/tmp/', 'fd', '~test\\d_1~'); $this->assertEqual($this->_sort($res), $this->_sort(array(lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/test1_1'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/hey/test3_1'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/test2_1')))); $this->_removeFileSystem(); }