mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-01 19:59:17 -05:00
[rcore] LoadDirectoryFilesEx(), count files if not recursive (#5496)
* LoadDirectoryFilesEx on not recursive loading count files * Removed FilePathList.capacity * Added security check in case of memory leak * Fix stop loading paths early on recursive loading * Fix count directories only if filter contains DIRECTORY_FILTER_TAG * rlparser: update raylib_api.* by CI * GetDirectoryFileCount() and GetDirectoryFileCountEx() made visible * rlparser: update raylib_api.* by CI * Added new file and directories filter tags * Renamed `fileCount` in `ScanDirectoryFiles()` to `expectedFileCount` --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -512,7 +512,6 @@ typedef struct VrStereoConfig {
|
||||
|
||||
// File path list
|
||||
typedef struct FilePathList {
|
||||
unsigned int capacity; // Filepaths max entries
|
||||
unsigned int count; // Filepaths entries count
|
||||
char **paths; // Filepaths entries
|
||||
} FilePathList;
|
||||
@ -1152,6 +1151,8 @@ RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload fi
|
||||
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||
RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
||||
RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths
|
||||
RLAPI unsigned int GetDirectoryFileCount(const char *dirPath); // Get the file count in a directory
|
||||
RLAPI unsigned int GetDirectoryFileCountEx(const char *basePath, const char *filter, bool scanSubdirs);// Get the file count in a directory with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
|
||||
|
||||
// Compression/Encoding functionality
|
||||
RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree()
|
||||
|
||||
Reference in New Issue
Block a user