summaryrefslogtreecommitdiff
path: root/src/sys_public.h
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-10-01 16:33:37 +0400
committerAndrey Nazarov <skuller@skuller.net>2010-10-01 17:21:52 +0400
commit57ff04fceb133d7c06c67bf991b5941766bb28da (patch)
tree4f7ca34f1a58cd35059c76f72dbdaadcc81684c7 /src/sys_public.h
parentffd86f8fccf7a523e89553fefaa621457460aa38 (diff)
Clean up and fix file listing functions.
- Merge Sys_ListFiles and Sys_ListFilteredFiles into the single Sys_ListFiles_r implementatation (per platform). - Fix an off-by-one bug in Sys_ListFiles (per platform). - Fix an off-by-one bug in FS_ListFiles. - Made Sys_ListFiles ignore hidden and non-regular (irregular?) files on Unix. - Limit maximum recursion depth to 8 (opposed to 32 on Unix and unlimited depth on Win32). - Reduce listed files limit to 2048 from 4096. - Implement FS_SEARCH_STRIPEXT flag instead of ugly hack in FS_File_g. - Kill unused FS_SEARCH_NOSORT flag. - Replace FS_SEARCHDIRS_* cruft with single FS_SEARCH_DIRSONLY flag. - Use unsigned integer type for flags. - Don't list more than 128 files to avoid console spam.
Diffstat (limited to 'src/sys_public.h')
-rw-r--r--src/sys_public.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys_public.h b/src/sys_public.h
index 76280a8..1ebf7e8 100644
--- a/src/sys_public.h
+++ b/src/sys_public.h
@@ -52,8 +52,8 @@ void Sys_Printf( const char *fmt, ... ) q_printf( 1, 2 );
void Sys_Error( const char *error, ... ) q_noreturn q_printf( 1, 2 );
void Sys_Quit( void ) q_noreturn;
-void **Sys_ListFiles( const char *path, const char *extension,
- int flags, size_t length, int *numFiles );
+void Sys_ListFiles_r( const char *path, const char *filter,
+ unsigned flags, size_t baselen, int *count_p, void **files, int depth );
struct file_info_s;
qerror_t Sys_GetPathInfo( const char *path, struct file_info_s *info );