[opencms-dev] Writing a plain text file

Steve Harder SHarder at greenridge.ca
Sat Feb 19 22:42:39 CET 2005


Hello, 

Does anyone know how to write a string to a plain file located in the VFS? What I would like to do is just to use a FileWriter, or even a FileOutputStream (in the past, people have claimed this can be done. See http://mail.opencms.org/pipermail/opencms-dev/2003q4/008388.html). When I try to do what this article state, it throws a FileNotFoundException, despite the fact that I am using cms.link and I have verified the file exists.

Am I stuck using a CmsFile object and writing a byte array to it? This doesn't seem to allow for string to be appended to the file, and it doesn't seem to be really what I want.

Any insights are appreciated greatly.

Thanks,

Steve



More information about the opencms-dev mailing list