protected File findProjectOrPredefinedFile(Integer projectId, String name) { File file = fileDao.findByName(projectId, name); if (file == null) { file = predefinedFilesDao.findByName(name); if (file != null) { file.setProject(loadProject(projectId)); } } return file; }
public static File lightweightClone(File file) { File clone = new File(file); clone.setData(null); return clone; }