Bfile FindNext

From WikiPrizm
Revision as of 15:00, 26 August 2012 by Ahelper (talk | contribs) (Initial page after experimenting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Header: fxcg/file.h
Syscall index: 0x1DB9
Function signature: int Bfile_FindNext( int FindHandle, const unsigned short *foundfile, file_type_t *fileinfo );

This function is used to list files and folders based on a find handle created by Bfile_FindFirst


  • int FindHandle - The find handle created by Bfile_FindFirst.
  • const unsigned short* foundfile - The string used to store the found file or folder name.
  • file_type_t fileinfo - Pointer to a file_type_t struct. See Bfile_FindFirst for the struct definition.


  • 0 - Successful read. Data is stored to foundfile and fileinfo
  • -16 - There are no more files or folders to be read. When this happens, call Bfile_FindClose on the FindHandle.


To read files, create a handle with Bfile_FindFirst. If the return value is 0, then the foundfile and fileinfo values are set. Keep calling this function, checking the return, then printing if 0 to read all files in the find handle. See the Using the File System tutorial for a full example