WHFSFolder::CreateFile (open)
Create a new file
Syntax
LOADLIB "mod::system/lib/internal/whfs/objects.whlib";
OBJECT FUNCTION CreateFile(RECORD metadata, RECORD options)Parameters
RECORD metadataMetadata of the new file. All cells except name are optional
BLOB dataData of the file
STRING descriptionDescription of the file (max 2048 bytes)
STRING externallinkURL this file links to
INTEGER filelinkId of object this file links to
INTEGER idId of the new file
STRING keywordsKeywords (string, max 1024 bytes, optional)
DATETIME modificationdateModificationdate for this file
STRING nameName of this file (required, must check ok with IsValidWHFSName)
INTEGER orderingRelative ordering vs other objects in the parent folder
BOOLEAN publishWhether this file is published. Ignored for non-publishable file types
STRING titleTitle of the file (max 256 bytes)
INTEGER typeId of the type of this file
RECORD optionsOptions
BOOLEAN setindexSet to TRUE to make this document the folder's index