public fun writeTo()

in graphql-dgs-codegen-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/generators/shared/DocFileSpec.kt [62:78]


    public fun writeTo(filer: Filer) {
        val filerSourceFile =
            filer.createResource(
                StandardLocation.SOURCE_OUTPUT,
                packageName,
                "$packageName.$extension",
            )
        try {
            filerSourceFile.openWriter().use { writer -> writeTo(writer) }
        } catch (e: Exception) {
            try {
                filerSourceFile.delete()
            } catch (ignored: Exception) {
            }
            throw e
        }
    }