@Override
    public RollingDestination createDestination() throws IOException {
        String dir = this.dir;
        String fileName = this.fileName;

        dir = pathCreator.replaceTimeVars(dir);
        dir = pathCreator.replaceUUIDVars(dir);

        fileName = pathCreator.replaceTimeVars(fileName);
        fileName = pathCreator.replaceUUIDVars(fileName);

        // Create a new destination.
        final Path file = Paths.get(dir).resolve(fileName);

        // Try and create the path.
        final Path parentDir = file.getParent();
        final Set<PosixFilePermission> permissions = parsePosixFilePermissions(filePermissions);
        if (!Files.isDirectory(parentDir)) {
            try {
                Files.createDirectories(parentDir);

                // Set permissions on the created directory
                if (permissions != null) {
                    Files.setPosixFilePermissions(parentDir, permissions);
                }
            } catch (final IOException e) {
                throw ProcessException.create("Unable to create output dirs: " + FileUtil.getCanonicalPath(parentDir));
            }
        }

        return new RollingFileDestination(pathCreator,
                key,
                getFrequencyTrigger(),
                getCronTrigger(),
                getRollSize(),
                Instant.now(),
                fileName,
                rolledFileName,
                parentDir,
                file,
                useCompression,
                compressionMethod,
                permissions
        );
    }
Joins text instances into a single text instance.
stroom-pipeline/src/main/java/stroom/pipeline/writer/RollingFileAppender.java