[opencms-dev] set last modified of a file

Olli Aro olli_aro at yahoo.co.uk
Tue Apr 27 12:25:02 CEST 2004


You need to write the file back to VFS after modifying it. Try
CmsObject.writeFile(CmsFile file).
 
Olli
 

 

   _____  

From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of Arno Illmann, e-Commerce Team SO
Sent: 27 April 2004 08:36
To: 'opencms-dev at opencms.org'
Subject: [opencms-dev] set last modified of a file

 

Hi, 

how can I set the last modified of a file? I tried: 

com.opencms.flex.jsp.CmsJspActionElement cms = new
com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response);

com.opencms.file.CmsResource res =
cms.getCmsObject().readFile("/dir/dir/file.html"); 

res.setDateLastModified(System.currentTimeMillis()); 

- No error, but the lastmodified was not changed. Any help would be really
appreciated. 

Thanks in Advance, Arno 


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040427/96e849d8/attachment.htm>


More information about the opencms-dev mailing list