In THREDDS server setup, I need to configure datasetScan filter element in catalog.xml so that it takes into account full file path, not just file name or directory name. Say, I have following folder structure:
/GGG/alpha/a
/b
/c
/GGG/beta/a
/b
/c
And I want to remove a file named a
only from folder alpha
. I can remove the file a
from both folders by setting
<exclude wildcard="a"/>
or I can remove the folder alpha
completely by setting
<exclude wildcard="alpha" atomic="false" collection="true"/>
but setting wildcard="alpha/a"
or anything similar does not seem to work. I have also tried regexp instead of wildcard and different combinations of atomic
and collection
, but no luck. Is my understanding correct that it is not currently possible to filter by folder and file names in one rule?
The <exclude>
and <include>
elements only allows to match the name, but no the full path.
P.S.: BTW, I have just made a pull request at the Thredds' GitHub repository to include this funcionality.
https://github.com/Unidata/thredds/pull/1015
Probably some tests and improvement should be reviewed.