SilverStripe\Assets\FileFinder

A utility class that finds any files matching a set of rules that are present within a directory tree.

Each file finder instance can have several options set on it:
- name_regex (string): A regular expression that file basenames must match.
- dir_regexp (string): A regular expression that dir basenames must match
- accept_callback (callback): A callback that is called to accept a file.
If it returns false the item will be skipped. The callback is passed the
basename, pathname and depth.
- accept_dir_callback (callback): The same as accept_callback, but only
called for directories.
- accept_file_callback (callback): The same as accept_callback, but only
called for files.
- file_callback (callback): A callback that is called when a file i
succesfully matched. It is passed the basename, pathname and depth.
- dir_callback (callback): The same as file_callback, but called for
directories.
- ignore_files (array): An array of file names to skip.
- ignore_dirs (array): An array of directory names to skip.
- ignore_vcs (bool): Skip over commonly used VCS dirs (svn, git, hg, bzr).
This is enabled by default. The names of VCS directories to skip over
are defined in .
- max_depth (int): The maxmium depth to traverse down the folder tree,
default to unlimited.