Type Definition physfs_sys::PHYSFS_EnumerateCallback[][src]

pub type PHYSFS_EnumerateCallback = Option<unsafe extern "C" fn(data: *mut c_void, origdir: *const c_char, fname: *const c_char) -> PHYSFS_EnumerateCallbackResult>;
Expand description

\typedef PHYSFS_EnumerateCallback \brief Function signature for callbacks that enumerate and return results.

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. :)

\param data User-defined data pointer, passed through from the API that eventually called the callback. \param 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. \param 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 A value from PHYSFS_EnumerateCallbackResult. All other values are (currently) undefined; don’t use them.

\sa PHYSFS_enumerate \sa PHYSFS_EnumerateCallbackResult