update For_each_file() to pass both full path and file name only to the callback

All  callbacks need to extract the filename anyway, so it simplify the code
This commit is contained in:
Thomas Bernard
2018-02-13 10:30:10 +01:00
parent a4593da4d4
commit 4a2754321f
5 changed files with 13 additions and 27 deletions

View File

@@ -97,7 +97,7 @@ int Directory_exists(char * directory);
int File_is_hidden(const char *fname, const char *full_name);
/// Scans a directory, calls Callback for each file in it,
void For_each_file(const char * directory_name, void Callback(const char *));
void For_each_file(const char * directory_name, void Callback(const char * full_name, const char * file_name));
typedef void T_File_dir_cb(void * pdata, const char * filename, const word * unicode_filename, byte is_file, byte is_directory, byte is_hidden);