function test_find_subitems() { $this->_create_file_system(); $res = dir :: find_subitems(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/hey'); sort($res); $this->assertEqual( $res, array( dir :: clean_path(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/hey/test3_1'), dir :: clean_path(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/hey/test3_2'), dir :: clean_path(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/hey/test3_3') ) ); $res = dir :: find_subitems(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/', 'f', '/^test2_1$/'); sort($res); $this->assertEqual( $res, array( dir :: clean_path(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/test2_2'), dir :: clean_path(TEST_DIR_ABSOLUTE_PATH . '/tmp/wow/test2_3'), ) ); $this->_remove_file_system(); }
function find_subdirs($dir, $full_path = false, $include_hidden = false, $exclude_items = false) { return dir::find_subitems($dir, 'd', $full_path, $include_hidden, $exclude_items); }