initializer-generator/src/main/java/org/apache/dubbo/initializer/generation/extension/codes/sample/ProtoBufCodeContributor.java [221:234]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void doWirte(Path filePath, String content, boolean append) throws IOException {
        Path folderPath = filePath.getParent();
        Files.createDirectories(folderPath);

        File file = filePath.toFile();

        if (!append || !file.exists()) {
            Files.writeString(filePath, content);
        } else {
            FileCopyUtils.copy(
                    new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8)),
                    Files.newOutputStream(filePath, StandardOpenOption.APPEND));
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



initializer-generator/src/main/java/com/alibaba/initializer/generation/extension/SampleCodeContributor.java [293:306]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void doWirte(Path filePath, String content, boolean append) throws IOException {
        Path folderPath = filePath.getParent();
        Files.createDirectories(folderPath);

        File file = filePath.toFile();

        if (!append || !file.exists()) {
            Files.writeString(filePath, content);
        } else {
            FileCopyUtils.copy(
                    new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8)),
                    Files.newOutputStream(filePath, StandardOpenOption.APPEND));
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



