File properties are system defined, as opposed to file attributes that are user defined. File properties are hard wired into Boomla and often have special behavior attached. You can set some properties but not all of them.
fileNodeId
link
type
title
statusCode
body
created
createdBy
modified
modifiedBy
descendantsModified
descendantsModifiedBy
attrHash
attrSize
bodyHash
bodySize
childrenHash
childrenSize
Note that the file name is not a file property. It is the file's address among its siblings. This is important because changing the file's name doesn't affect its fileHash.
fileNodeId string
The fileNodeId is the ID of a file node within a volume. The fileNodeId is unique within a volume but not within a filesystem, which is a tree of volumes.
In comparison, the fileId is like a path, identifying a file node within a filesystem. It is a concatenated string of fileNodeIds.
Currently, fileNodeIds are 128bit pseudo-random numbers represented in string format. (Note that this may change at any time, so you should always treat it as a raw string.)
Example fileNodeID: iF78B0BDEC6305840069A4D27D48D2A7B
.
The root file of a volume currently always has the fileNodeId i2
.
link string
The link property is a string holding a well-formatted file link.
It is an ASCII string in form LINKTYPE ARGS
:
LINKTYPE
is a valid link type, like package
.
ARGS
is zero or more link type specific arguments. Its size is limited to 65536
bytes.
type string
The type property holds the name of a built-in type or an internal path to a file. Its maximum length is 64KB
.
title string
The title property holds the file’s human readable name, possibly with spaces and other special characters. An UTF-8 string, maximum 255
bytes long.
statusCode uint32
The statusCode property stores the status of a file. It may indicate an error. Currently, it is only used for setting the status code of the HTTP response.
Its values follow the HTTP conventions except for the default value 0
:
0
means OK which is the default,
200
means OK (it is recommended to use 0
instead),
300
- 399
redirect,
400
- 499
client error,
500
- 599
server error.
See the list of HTTP Status Codes on Wikipedia for more details.
body string
The body is a binary storage area, limited to 10MB.
created uint32
The created property stores a unix timestamp of when the file was created.
createdBy UserId
The createdBy property stores the UserId of the user that created the file.
modified uint32
The modified property stores a unix timestamp of when the file was last modified.
modifiedBy UserId
The modifiedBy property stores the UserId of the user that last modified the file.
descendantsModified uint32
The descendantsModified property stores the unix timestamp when any of the file's descendants was last modified. Removing any of the file's descendants will also update this property, thus it may be greater than the largest modifiedBy property in its subtree.
descendantsModifiedBy UserId
The descendantsModifiedBy property stores the UserId of the user that was last to make a change to any of the file's descendants.
attrHash Hash
The attrHash is the hash of the file's attributes when serialized. It is not guaranteed to be normalized. If two files have the same attrHash, their attributes are guaranteed to match. If two files have different attribute hashes, their attributes may or may not match.
attrSize uint64
The attrSize is the size of the file's attributes when serialized, in bytes.
bodyHash Hash
The bodyHash is the hash of the file's body. It is not guaranteed to be normalized. If two files have the same bodyHash, their bodies are guaranteed to be identical. If two files have different body hashes, their bodies may or may not match.
bodySize uint64
The bodySize is the size of the file's body in bytes.
childrenHash Hash
The childrenHash is the hash of the data structure representing the file's children, when serialized.
childrenSize uint64
The childrenSize property is the size of all serialized data structures required to represent the child subtree of a file, in bytes.
Note: data deduplication is not taken into account here. If you make 100 copies of a 10MB file, it will show as 1GB while in fact it will only use 10MB disk space (plus a little overhead).