Scroll to navigation

SDL_EnumerateDirectoryCallback(3type) SDL3 DATATYPES SDL_EnumerateDirectoryCallback(3type)

NAME

SDL_EnumerateDirectoryCallback - Callback for directory enumeration.

HEADER FILE

Defined in SDL3/SDL_filesystem.h

SYNOPSIS

#include "SDL3/SDL.h"
typedef SDL_EnumerationResult (SDLCALL *SDL_EnumerateDirectoryCallback)(void *userdata, const char *dirname, const char *fname);

DESCRIPTION

Enumeration of directory entries will continue until either all entries have been provided to the callback, or the callback has requested a stop through its return value.

Returning SDL_ENUM_CONTINUE
will let enumeration proceed, calling the callback with further entries.

SDL_ENUM_SUCCESS
and

SDL_ENUM_FAILURE
will terminate the enumeration early, and dictate the return value of the enumeration function itself.

FUNCTION PARAMETERS

an app-controlled pointer that is passed to the callback.
the directory that is being enumerated.
the next entry in the enumeration.

RETURN VALUE

Returns how the enumeration should proceed.

AVAILABILITY

This datatype is available since SDL 3.1.3.

SEE ALSO

(3), SDL_EnumerateDirectory(3)

SDL 3.1.6 Simple Directmedia Layer