/** * Writes a single OpenCms VFS file to the ZIP export.<p> * * @param file the OpenCms VFS file to write * @param name the name of the file in the export * * @throws IOException in case of file access issues */ protected void writeFile2Zip(CmsFile file, String name) throws IOException { ZipEntry entry = new ZipEntry(name); // save the time of the last modification in the zip entry.setTime(file.getDateLastModified()); m_exportZipStream.putNextEntry(entry); m_exportZipStream.write(file.getContents()); m_exportZipStream.closeEntry(); }
/** * Writes a single OpenCms VFS file to the ZIP export.<p> * * @param file the OpenCms VFS file to write * @param name the name of the file in the export * * @throws IOException in case of file access issues */ protected void writeFile2Zip(CmsFile file, String name) throws IOException { ZipEntry entry = new ZipEntry(name); // save the time of the last modification in the zip entry.setTime(file.getDateLastModified()); m_exportZipStream.putNextEntry(entry); m_exportZipStream.write(file.getContents()); m_exportZipStream.closeEntry(); }
} else { res.setDateHeader(CmsRequestUtil.HEADER_LAST_MODIFIED, file.getDateLastModified());
} else { res.setDateHeader(CmsRequestUtil.HEADER_LAST_MODIFIED, file.getDateLastModified());
CmsFile file = cms.readFile(resName); file.setDateLastModified(file.getDateLastModified());
CmsFile file = cms.readFile(resName); file.setDateLastModified(file.getDateLastModified());
getDateCreated(), getUserCreated(), getDateLastModified(), getUserLastModified(), getDateReleased(), clone.setDateLastModified(getDateLastModified());
clone.setDateLastModified(getDateLastModified());
CmsFile file = getCms().readFile(resName); file.setDateLastModified(file.getDateLastModified());
/** * Returns the virtual resource as a file.<p> * * @return the virtual resource as a file */ public CmsFile getFile() { if (m_base instanceof CmsFile) { CmsFile file = (CmsFile)m_base; return new CmsFile( file.getStructureId(), file.getResourceId(), m_rootPath, m_typeId, file.getFlags(), file.getProjectLastModified(), file.getState(), file.getDateCreated(), file.getUserCreated(), file.getDateLastModified(), file.getUserLastModified(), file.getDateReleased(), file.getDateExpired(), file.getSiblingCount(), file.getLength(), file.getDateContent(), file.getVersion(), file.getContents()); } return new CmsFile(getResource()); }