FileIdentifier interface
A JavaScript object implementing the FileIdentifier
interface is a reference to a File
used as a value within a StoreObject
. It includes extra information to implement the user interface for ‘file version tracks’ provided by the Platform.
The digest
and fileSize
are used to unambiguously identify the File
to which it refers.
Construction
Use identifier()
on a File
object, or mutableCopy()
on a FileIdentifier
object.
Interface
function mutableCopy()
Returns a mutable copy of this FileIdentifier
.
Interface (read only properties)
property digest
The digest of the file, as a hex encoded String
.
property fileSize
The size of the file, in bytes, as a number.
Interface (mutable properties)
If a FileIdentifier
is created using the identifier()
function of a File
object, or a mutable copy made with mutableCopy()
, the following properties are read/write.
property mimeType
The MIME type of the file. This does not have to match the mimeType
property of the underlying File
.
property filename
The filename of the file. This does not have to match the filename
property of the underlying File
.
property trackingId
A randomly generated String
for tracking versions within a ‘file version track’. Used for generating the version listings in the web user interface.
property version
The version of this version within a ‘file version track’, as a String
.
property logMessage
A String
containing the user’s description of the changes made in this version within a ‘file version track’.
function identifier()
Returns itself. Implemented so that you can call identifier()
on both FileIdentifier
and File
objects.