184
edits
(→Browsing contents: forEachFile: details on filter) |
|||
| Line 410: | Line 410: | ||
* Note: objects of type DirectoryDescriptor are iterable. Therefore, you can also loop through them using a standard [for..in]. | * Note: objects of type DirectoryDescriptor are iterable. Therefore, you can also loop through them using a standard [for..in]. | ||
* | * | ||
* @param { | * @param {string=} filter. If provided, uses OS-accelerated, platform-specific, filtering, where available. | ||
* @param {function(string, FileDescriptor.FileInfo, number, function() FileDescriptor)} onFile A function called for each file in the directory, with the name of the file, a (lazy) file info for that file and a file number. If the function returns anything [null], the loop stops immediately and returns the value returned by that function. | * @param {function(string, FileDescriptor.FileInfo, number, function() FileDescriptor)} onFile A function called for each file in the directory, with the name of the file, a (lazy) file info for that file and a file number. If the function returns anything [null], the loop stops immediately and returns the value returned by that function. | ||
* | * | ||
edits