function flush() { $files = lmbFs::find($this->getCacheDir(), 'f'); foreach ($files as $file) { lmbFs::rm($file); } }
function testFind() { $this->_createFileSystem(); $res = lmbFs::find(LIMB_VAR_DIR . '/tmp/wow/hey'); $this->assertEqual($this->_sort($res), $this->_sort(array(lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/hey/test3_1'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/hey/test3_2'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/hey/test3_3')))); $res = lmbFs::find(LIMB_VAR_DIR . '/tmp/wow/', 'f', null, '/^test2_1$/'); $this->assertEqual($this->_sort($res), $this->_sort(array(lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/test2_2'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/test2_3')))); $this->_removeFileSystem(); }