[opencms-dev] Create file with createFile()

Pierre Tissot Pierre.Tissot at cern.ch
Tue Dec 16 14:18:00 CET 2003


Hi:

I'm trying to create a file but I dont know what to put in the resource 
type???
Heres the code anyone can help me?

   CmsObject cmsobj = cms.getCmsObject();
    CmsFile file;
    try{
      file = cmsobj.readFile(foldername+"LDAPCache.xml");
out.println(file.getResourceName());
    }
    catch(CmsException e){
      out.println("File Missing!!!!");
      String content = new String("some things about nothing");
      cmsobj.createFile(foldername,"LDAPCache.xml",content.getBytes() , 
?????????????);
      file = cmsobj.readFile(foldername+"LDAPCache.xml");
}

Thx
Pierre




More information about the opencms-dev mailing list