wiki.icculus.org
[ front page | index | search | recent changes | git repo | offline html ]

PHYSFS_EnumerateCallback

Function signature for callbacks that enumerate and return results.

Header File

Defined in <physfs.h>

Syntax

typedef PHYSFS_EnumerateCallbackResult (PHYSFS_CALL *PHYSFS_EnumerateCallback)(void *data, const char *origdir, const char *fname);

Function Parameters

data User-defined data pointer, passed through from the API that eventually called the callback.
origdir A string containing the full path, in platform-independent notation, of the directory containing this file. In most cases, this is the directory on which you requested enumeration, passed in the callback for your convenience.
fname The filename that is being enumerated. It may not be in alphabetical order compared to other callbacks that have fired, and it will not contain the full path. You can recreate the fullpath with origdir/fname ... The file can be a subdirectory, a file, a symlink, etc.

Return Value

Returns A value from PHYSFS_EnumerateCallbackResult. All other values are (currently) undefined; don't use them.

Remarks

This is the same thing as PHYSFS_EnumFilesCallback from PhysicsFS 2.0, except it can return a result from the callback: namely: if you're looking for something specific, once you find it, you can tell PhysicsFS to stop enumerating further. This is used with PHYSFS_enumerate(), which we hopefully got right this time. :)

Version

This typedef is available since PhysicsFS 2.1.0.

See Also


CategoryAPI, CategoryAPIDatatype, CategoryPhysicsFS


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.