[opencms-dev] Directory structure

Kelvin kelvin.ang at resonance.com.sg
Wed Jun 30 04:40:02 CEST 2004


Hi Matt,

Thanks for your help. Anyway I found the reason why i can't seem to get the 
files in the directory is because they are in the 
/system/modules/org.opencms.templates/resources/" folder. I solved it by 
creating a "/picture" from the root directory and everything works fine 
after that.

Just curious. I can't seem to view any files from "/system" directory with 
the same code. Is that a opencms security mechanism that prevents users 
from getting to the "system" folder? Is there anyway to get around that?

Cheers,
Kelvin

>Kelvin,
>
>Take a look at this posting on the forum:
>
>http://www.opencms-forum.de/viewtopic.php?t=190
>
>Matt
>
>Kelvin wrote:
>>Hi All,
>>I am try to get a list of the files in the directory, but when i run the 
>>script below, i get "0" for the file.size().
>>====================================================
>>String resPath = cms.link("../resources/");
>>out.println(resPath);
>>ArrayList file = new ArrayList();
>>file.addAll(cms.getCmsObject().getFilesInFolder(resPath));
>>out.println(file.size());
>>====================================================
>>I am trying to get the files from: 
>>"/system/modules/org.opencms.templates/resources/"
>>and "out.println(resPath)" returns: 
>>"opencms/opencms/system/modules/org.opencms.templates/resources/"
>>Can someone tell me what i got wrong? Thanks a lot
>>Cheers,
>>Kelvin
>>
>>_______________________________________________
>>This mail is send to you from the opencms-dev mailing list
>>To change your list options, or to unsubscribe from the list, please visit
>>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list