Instance Method
file(template:escape:on:)
Conformance to
LeafSource to allow LeafRenderer to request a template.func file(template: String, escape: Bool = false, on eventLoop: any EventLoop) throws -> EventLoopFuture<ByteBuffer>
Parameters
templateRelative template name (eg:
"path/to/template")escapeIf the adherent represents a filesystem or something scoped that enforces a concept of directories and sandboxing, whether to allow escaping the view directory
eventLoopEventLoopon which to perform file access
Return Value
A succeeded EventLoopFuture holding a ByteBuffer with the raw template, or an appropriate failed state ELFuture (not found, illegal access, etc)