Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293129

Add a RegexDirectoryIterator

$
0
0

Problem/Motivation

Suggested in #2671034: Create plugin per file YAML discovery, we should have a general iterator that can iterate files for us in a directory that match a supplied pattern. That issue introduces a pattern similar to the config system, which also uses the same thing - getting lists of YAML files from a directory. We can then standardise the usage throughout core and contrib. I would guess that a lot of contrib modules will need something similar (also suggested in the mentioned issue above). So would be good to not have umpteen different implementations (probably all with different bugs) in lots of different places.

Proposed resolution

Add a RegexDirectoryIterator class that just needs a directory and a pattern passed in

Remaining tasks

User interface changes

None

API changes

New class

Data model changes

None


Viewing all articles
Browse latest Browse all 293129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>