private void saveResource(IResource resource) throws IOException {
        Path resourceDir = Paths.get(targetFolder.toAbsolutePath() + IParameters.RESOURCES_DIR);
        if (!resourceDir.toFile().exists()) {
            Files.createDirectories(resourceDir);
        }
        Path target = Paths.get(resourceDir.toAbsolutePath() + "\\" + resource.getFileName());
        if (!target.toFile().exists()) {
            try (InputStream is = new ByteArrayInputStream(resource.getContent())) {
                Files.copy(is, target);
            }
        } else {
            LOG.debug(format("%s уже загружен: %s", toString(), target));
        }
    }