Documentation Language: Swift

Method

getContent(_:)

Retrieves the preserved content for a protected area.

func getContent(_ id: String) -> String?

Parameters

id

The protected area identifier

Return Value

The preserved content, or nil if no content exists

Example

if let imports = await manager.getContent("user-imports") {
    writer.write(imports)
} else {
    // Use default content
    writer.write("// Default imports")
}