File node

Here we discuss a file node as a static object. Here we ignore links, see the Filesystem Tree for details on them.

A file node has properties, attributes, body and child nodes. Children are discussed in the Filesystem Tree section, here we discuss the rest.

Properties

Files have properties, which are system defined.

ID    
NAME
TITLE
PLACEHOLDER
LINK
TYPE
STATUSCODE
CREATED
MODIFIED

ID

A identifier unique within a filesystem. Two separate filesystems (websites) can have files with equal IDs.

It is an ASCII string with printable chars of maximum 4096 bytes length.

The ID of a file is guaranteed to be stable within a transaction. It is NOT guaranteed to be stable over years - we may change its format.

NAME

The file’s name which you can see in the URL. It may be generated from the file’s title. It is maximum 255 bytes long, may contains ASCII chars from the following groups:

  • Lowercase letters: abcdefghijklmnopqrstuvwxyz
  • Uppercase letters: ABCDEFGHIJKLMNOPQRSTUVQXYZ
  • Numbers: 0123456789
  • Dot: .
  • Dash: -
  • Underscore: _

There are some special rules:

  • files starting with a dot (.) are hidden,
  • you must not use the dash (-) and the underscore (_) at the start (those are reserved).
  • the name must not start with double dots (..)
  • names starting with dot (.) followed by an uppercase letter are reserved, shall only be used for the purposes as specified by the Boomla docs. For example: .Request.

TITLE

The file’s human readable name, possibly with spaces and other special characters. A UTF-8 string, maximum 255 bytes long.

PLACEHOLDER

Of type uint8, which is the range [0, 255].

LINK

ASCII string in form LINKTYPE ARGS. The ARGS part is limited in 65536 bytes in length.

Linktype is a valid link type, like import. Arg is any type specific argument(s).

Example: import markdown.app.boomla.com

TYPE

Path to an application. Must be local path, maximum 65536 bytes in length.

The (file) type defines how a file reacts to various events.

STATUSCODE

Uint32 status code following the HTTP conventions except for the default value 0:

  • 0 means OK which is the default,
  • 200 means OK,
  • 300 - 399 redirect,
  • 400 - 499 client error,
  • 500 - 599 server error.

See the list of HTTP Status Codes on Wikipedia for more details.

CREATED

Unix timestamp of when the file was created. Uint32.

MODIFIED

Unix timestamp of when the file was last modified. Uint32.

Attributes

Files have attributes, which are user defined.

The number of attributes a file may have is uncapped, though the size of all the attributes together is capped in 0.2Kb.

The following attribute types are supported:

  • string, maximum 0.2Kb in length,
  • int32.

Attributes allow you to use a file like a row in a database.

Body

The file body is a binary storage area, limited in 10Mb.

This is the traditional storage area of a file.