Create an index for a certain directory. If the directory does not exist, then the object will still be created.
Returns the directory name.
Add a certain file to the index. This method returns the ABSOLUTE path to that file, which must be used to access it. When not explicitly specified, the ABSOLUTE path will be calculated.
For internal use only. Force the creation of the index (if not already done). Returns a hash with key-value pairs, where the key is the lower-cased version of the filename, and the value the case-sensitive version of the filename.
Returned is a list of filenames which is used to update the list of MSGIDs when source files have changed. All translation files which belong to a certain DOMAIN are listed.
The EXTENSION filter can be used to reduce the filenames further, for
instance to select only po
or only mo
files, and ignore readme's.
Use an string, without dot and interpreted case-insensitive, or a
regular expresion.
my @l = $index->list('my-domain'); my @l = $index->list('my-domain', 'po'); my @l = $index->list('my-domain', qr/^readme/i);