[opencms-dev] Replace a string in all pages

Alexander Kandzior alex at opencms.org
Thu Feb 10 09:50:17 CET 2005


> CmsObject#readResources(String resourcename, 
> CmsResourceFilter filter, boolean readTree) 

This will give you a list of all resources in the tree. What you have to
make sure then is that if you rename a folder A to B, you must first have
renamed all files inside the folder A, e.g. A/a, because otherwise the files
will not longer be available for renaming since the folder name is now B/a,
but your list still contains A/a. 

Another way of doing this is a VFS Tree DFS. You can copy / paste some code
for this from the org.opencms.file.types.CmsResourceTypeFolder class, but
you must modify it to use the CmsObject rather then teh securitymanager.

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com





More information about the opencms-dev mailing list