Class FileResourceConstants

java.lang.Object
com.inductiveautomation.ignition.common.fileresources.FileResourceConstants

public final class FileResourceConstants extends Object
Constants for the platform-level file resources feature. See RFC-31.

A file resource is a generic project resource that holds arbitrary file content (text or binary). Each resource stores its bytes under a single data key whose name matches the resource's leaf name (so e.g. a resource named manual.pdf has its data stored at the key manual.pdf). This makes the on-disk project tree directly browsable and VCS-friendly.

  • Field Details

    • RESOURCE_TYPE

      public static final ResourceType RESOURCE_TYPE
      The resource type for file resources. Lives in the platform namespace.
    • ATTR_CONTENT_TYPE

      public static final String ATTR_CONTENT_TYPE
      Attribute key holding the authoritative content type for a file resource as a JSON string.
      See Also:
    • ATTR_HTTP

      public static final String ATTR_HTTP
      Attribute key holding the FileResourceConfig (HTTP exposure config) as a JSON object. Absent until the user enables HTTP exposure.
      See Also:
    • SERVLET_MOUNT

      public static final String SERVLET_MOUNT
      The first path segment of the file resources servlet mount point. Combined with /system/ by WebResourceManager.addServlet, the public URL prefix is /system/files/....
      See Also:
    • NAME_PATTERN

      public static final Pattern NAME_PATTERN
      Validation pattern for file resource names. URL-safe per RFC 3986 unreserved chars: letters, digits, dot, dash, underscore. No whitespace or path separators.
  • Method Details

    • maxSizeBytes

      public static long maxSizeBytes()
      Returns:
      the configured maximum file resource size in bytes.
    • concurrency

      public static int concurrency()
      Returns:
      the configured servlet concurrency limit. Values <= 0 disable serving entirely.
    • isValidName

      public static boolean isValidName(String name)
      Returns:
      true if name is a valid file resource name. Folder names follow the same rule. The single-dot and double-dot names are rejected, since they have special meaning in path resolution.