diff options
Diffstat (limited to 'src/common/file_util.h')
| -rw-r--r-- | src/common/file_util.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h index 32ae2dc57..7ad7ee829 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -105,13 +105,11 @@ bool CreateEmptyFile(const std::string &filename); | |||
| 105 | * @param num_entries_out to be assigned by the callable with the number of iterated directory entries, never null | 105 | * @param num_entries_out to be assigned by the callable with the number of iterated directory entries, never null |
| 106 | * @param directory the path to the enclosing directory | 106 | * @param directory the path to the enclosing directory |
| 107 | * @param virtual_name the entry name, without any preceding directory info | 107 | * @param virtual_name the entry name, without any preceding directory info |
| 108 | * @param recursion Number of children directory to read before giving up | ||
| 109 | * @return whether handling the entry succeeded | 108 | * @return whether handling the entry succeeded |
| 110 | */ | 109 | */ |
| 111 | using DirectoryEntryCallable = std::function<bool(unsigned* num_entries_out, | 110 | using DirectoryEntryCallable = std::function<bool(unsigned* num_entries_out, |
| 112 | const std::string& directory, | 111 | const std::string& directory, |
| 113 | const std::string& virtual_name, | 112 | const std::string& virtual_name)>; |
| 114 | unsigned int recursion)>; | ||
| 115 | 113 | ||
| 116 | /** | 114 | /** |
| 117 | * Scans a directory, calling the callback for each file/directory contained within. | 115 | * Scans a directory, calling the callback for each file/directory contained within. |
| @@ -119,10 +117,9 @@ using DirectoryEntryCallable = std::function<bool(unsigned* num_entries_out, | |||
| 119 | * @param num_entries_out assigned by the function with the number of iterated directory entries, can be null | 117 | * @param num_entries_out assigned by the function with the number of iterated directory entries, can be null |
| 120 | * @param directory the directory to scan | 118 | * @param directory the directory to scan |
| 121 | * @param callback The callback which will be called for each entry | 119 | * @param callback The callback which will be called for each entry |
| 122 | * @param recursion Number of children directories to read before giving up | ||
| 123 | * @return whether scanning the directory succeeded | 120 | * @return whether scanning the directory succeeded |
| 124 | */ | 121 | */ |
| 125 | bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string &directory, DirectoryEntryCallable callback, unsigned int recursion = 0); | 122 | bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string &directory, DirectoryEntryCallable callback); |
| 126 | 123 | ||
| 127 | /** | 124 | /** |
| 128 | * Scans the directory tree, storing the results. | 125 | * Scans the directory tree, storing the results. |