I have a piece of Java code that will create a new file and fill it with existing data elsewhere. When right clicking on the file and looking at its properties. There will be this property "Created" and "Modified" which are set to the date when the file was created by the code.
I would like to retain the Created/Modified date that the old file had. Is it possible?
ContentReader reader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);
if (reader == null)
{
// no data for this node
return false;
}
File output = new File(outputFileName);
reader.getContent(output);