In package com.eden.orchid.api.resources.resource

public final class FileResource extends FreeableResource

public final

A Resource type that provides a content to a template from a resource file on disk. When used with renderTemplate() or renderString(), this resource will supply the page.content variable to the template renderer as the file contents after having the embedded data removed, and any embedded data will be available in the renderer through the page variable. When used with renderRaw(), the raw contents (after having the embedded data removed) will be written directly instead.

Constructors

FileResource(OrchidContext context, File file) public

Parameters:
FileResource(File file, OrchidReference reference) public

Parameters:

Methods

void loadContent() protected
Method Annotations:
@Override

InputStream getContentStream() public
Method Annotations:
@Override

void canUpdate() public
Method Annotations:
@Override

void canDelete() public
Method Annotations:
@Override

void update(InputStream newContent) public
Method Annotations:
@Override

Parameters:
  • InputStream newContent
void delete() public
Method Annotations:
@Override