intellij-plugin-structure/structure-toolbox/src/main/kotlin/com/jetbrains/plugin/structure/toolbox/FileChecker.kt [17:40]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fun addFile(file: Path): Boolean { if (sumFiles <= MAX_FILES) { sumFiles += 1 if (sumFiles > MAX_FILES) { problems.add(TooManyFiles(MAX_FILES)) } } if (!Files.exists(file)) { problems.add(MissedFile(file.fileName.toString())) return false } val size = Files.size(file) if (size > MAX_FILE_SIZE) { problems.add(FileTooBig(file.toString(), MAX_FILE_SIZE)) } if (sumSize <= MAX_PLUGIN_SIZE) { sumSize += size if (sumSize > MAX_PLUGIN_SIZE) { problems.add(PluginFileSizeIsTooLarge(MAX_PLUGIN_SIZE)) } } return problems.isEmpty() } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - intellij-plugin-structure/structure-fleet/src/main/kotlin/com/jetbrains/plugin/structure/fleet/FileChecker.kt [19:42]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fun addFile(file: Path): Boolean { if (sumFiles <= MAX_FILES) { sumFiles += 1 if (sumFiles > MAX_FILES) { problems.add(TooManyFiles(MAX_FILES)) } } if (!Files.exists(file)) { problems.add(MissedFile(file.fileName.toString())) return false } val size = Files.size(file) if (size > MAX_FILE_SIZE) { problems.add(FileTooBig(file.toString(), MAX_FILE_SIZE)) } if (sumSize <= MAX_PLUGIN_SIZE) { sumSize += size if (sumSize > MAX_PLUGIN_SIZE) { problems.add(PluginFileSizeIsTooLarge(MAX_PLUGIN_SIZE)) } } return problems.isEmpty() } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -