[opencms-dev] cmsobject
bub habub
japorami at yahoo.com
Fri Jun 24 11:09:39 CEST 2005
hi,
i'm trying to create sort of a scheduler that checks
every time certain time period if the files of one
folder were modified or not.
i have some problems to find a way to list all the
files in the folder.
i thought of using CmsDefaultCollector to get all the
files but i don't know what the cmsobject is for that
the method getAllInFolder() is waiting.
where do i get the opencms object.
i'm sorry to ask so simple questions but i'm new to
opencms, java, jsp and xml.
here some of my code:
<%@page import="org.opencms.file.*, java.awt.*" %>
<%
CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
CmsDefaultResourceCollector collector = new
CmsDefaultResourceCollector();
String path = collector.getFolderPath("www/");
Boolean tree = true;
List listfiles = collector.getAllInFolder(cmsobject,
path, tree);
String folderfiles [] = listfiles.getItems();
Int numberoffiles = listfiles.getItemCount();
out.println(folderfiles);
out.println(numberoffiles);
Int x = 0;
for(int x = 0; x =(numberoffiles-1); x++)
{
= cms.getResource(folderfiles[x]);
cms.getLastDateModified();
}
%>
thanks a lot
jap
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the opencms-dev
mailing list