Exemplo n.º 1
0
static int l_filefind_attributes(lua_State* L) {
	struct FileFindInfo* info;
	l_filefind_first(L);
	info = filefind_checkmetatable(L, -1);
#if defined(_WIN32)
	if (info->handle == INVALID_HANDLE_VALUE) {
		info->handle = NULL;
		return 0;
	}
#else
	if (!info->dirp)
		return 0;
#endif
	filefind_index_table_helper(L, info, 1);
	filefind_close_helper(L, info);
	return 1;
}
Exemplo n.º 2
0
static int l_filefind_match(lua_State* L) {
	l_filefind_first(L);
	lua_pushcclosure(L, LS_filefind_matchiter, 1);
	return 1;
}