boolean (@NotNull VirtualFile virtualFile) { myIndicator.checkCanceled(); String relativePath = VfsUtilCore.getRelativePath(virtualFile, myRootDir, '/'); if (relativePath == null) { throw new RuntimeException("Can't find relative path for " + virtualFile + " in " + myRootDir); } String entryName = myPrefix + '/' + relativePath; if (virtualFile.isDirectory()) { try { myStream.addDirectory(entryName); } catch (IOException e) { LOG.error(e); } } else { String fileName = virtualFile.getName(); myIndicator.setText2(fileName); boolean system = Project.DIRECTORY_STORE_FOLDER.equals(virtualFile.getParent().getName()); if (!system || ALLOWED_FILES.contains(fileName) || fileName.endsWith(".iml")) { try { if (virtualFile.getFileType().isBinary() || PROJECT_TEMPLATE_XML.equals(virtualFile.getName())) { myStream.addFile(entryName, new File(virtualFile.getPath())); } else { String result = getEncodedContent(virtualFile, myProject, myParameters, getFileHeaderTemplateName(), myShouldEscape); myStream.addFile(entryName, result.getBytes(StandardCharsets.UTF_8)); } } catch (IOException e) { LOG.error(e); } } } return true; }