[opencms-dev] enumeration every file in site tree

Christian Steinert christian_steinert at web.de
Wed Mar 29 00:58:35 CEST 2006


Christoph P. Kukulies schrieb:
> What is the convenient way to enumerate (list) all files and folders
> in your site? Is there some ready made method or should I use
> the org.opencms.file package and test if it is a folder, then get subfolders
> etc..?
>
>
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>   
If you want to loop over files that show up in navigation, then you can 
use CmsJspNavBuilder, which you can get from CmsJspActionElement
(I think it is cmsJspActionElement.getNavigation())
There is a sample for this in the Alkacon docs

If you want to loop over files that have no navigation information, then 
I know  nothing better than cmsObject.getFilesInFolder and 
cmsObject.getSubFolders

hth
christian



More information about the opencms-dev mailing list