static File createDir(final String dirName)
    {
        final File dir = new File(dirName);
        if (!dir.exists() && !dir.mkdirs())
        {
            throw new IllegalStateException("Unable to create directory: " + dirName);
        }

        return dir;
    }
{@link OutputManager} for managing the creation of Rust source files as the target of code generation.
The character encoding for the {@link java.io.Writer} is UTF-8.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustOutputManager.java