Class RGen::Util::CachedGlob
In: lib/rgen/util/cached_glob.rb
Parent: Object

WARNING: the mechanism of taking timestamps of directories in order to find out if the content has changed doesn‘t work reliably across all kinds of filesystems

Methods

glob   new  

Public Class methods

Public Instance methods

returns all files contained in directories matched by dir_glob which match file_glob. file_glob must be relative to dir_glob. dir_glob "*/a" with file_glob "**/*.txt" is basically equivalent with Dir.glob("*/a/**/*.txt") the idea is that the file glob will only be re-eavluated when the content of one of the directories matched by dir_glob has changed. this will only be faster than a normal Dir.glob if the number of dirs matched by dir_glob is relatively large and changes in files affect only a few of them at a time.

[Validate]