[opencms-dev] Exists file?

Christian Steinert christian_steinert at web.de
Fri Sep 8 02:48:29 CEST 2006


> Hallo.
>
> How can I do to know if exists a file in OpenCMS 6.2.1?
>
> I was using the followings lines with OpenCMS 5.0:
>
> -----
> try
> {
>  cms.readFileHeader(filename);
>  existe_en_version = true;
> }
> catch (CmsException e)
> {
>  existe_en_version = false;
> }
> -----
>
> Can you help to me??

Dear Andres,

please just write to the list.

    CmsResource res = *cms*.*readResource*(filename);

For things like this it's good to consult the Javadoc, especially for
the classes CmsObject and CmsJspActionElement.

Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060908/85c3a9eb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060908/85c3a9eb/attachment.bin>


More information about the opencms-dev mailing list