<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#d8d0c8>
<DIV><FONT face=Arial size=2>I've just found the way in an old
post:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> boolean result =
false;<BR> try
{<BR> cmsObject.readFileHeader(resource);<BR> result
= true;<BR> } catch (CmsException e)
{<BR> result =
false;<BR> }<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks anyway</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=eviera@sdd.com.ar href="mailto:eviera@sdd.com.ar">Emiliano Viera</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=opencms-dev@opencms.org
href="mailto:opencms-dev@opencms.org">opencms-dev</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 26, 2004 4:41
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [opencms-dev] Existing
file</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>How can i check that a file in the VFS exists
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Im trying to show images instead of text on a
menu, but i need to ensure that the image file do exists. If i try to do
something like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>cms.link("/system/galleries/pics/App/" +
nav.getNavText() + ".gif")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>It always returns a string and doesn't check that
the referenced file exists. If i use it, and the file doens't exists, the
browser shows a broken image.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Emiliano</FONT></DIV></BLOCKQUOTE></BODY></HTML>