Create an index for a certain directory. If the directory does not exist or is empty, then the object will still be created.
All files the $directory tree which are recognized as an translation table format which is understood will be listed. Momentarily, those are:
=over
[0.99] Files which are in directories which start with a dot (hidden directories) and files which start with a dot (hidden files) are skipped.
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 expression.
my @l = $index->list('my-domain'); my @l = $index->list('my-domain', 'po'); my @l = $index->list('my-domain', qr/^readme/i);