WHFSFile (open)
WHFS file object
Syntax
LOADLIB "mod::system/lib/internal/whfs/objects.whlib";
OBJECTTYPE WHFSFile
Properties
- PROPERTY contentmodificationdate
Last content update date. Please note that WebHare versions before 5.6 never recorded this, and have usually set it to the firstpublishdate of the file
- PROPERTY creationdate
Creationdate
- PROPERTY data
Data of this file
- PROPERTY description
Description
- PROPERTY externallink
URL this file links to (only for link-files)
- PROPERTY filelink
Id of file this file links to (only for link-files)
- PROPERTY firstpublishdate
First publication date. Please note that WebHare versions before 3.13 never recorded this, and have usually set it to the creationdate of the file
- PROPERTY fullpath
Full path within this site
- PROPERTY highestparent
Id of the highest in-site parent (ie, parentsite->root)
- PROPERTY highestparentobject
- PROPERTY id
Id of this object
- PROPERTY isacceptableindex
Whether files of this type can function as index
- PROPERTY isactive
Whether this object is active (not in the trash)
- PROPERTY isfolder
Whether this is a folder
- PROPERTY ispinned
Whether this object is pinned (locked for renaming/deleting)
- PROPERTY keywords
Keywords
- PROPERTY lastpublishdate
Last publication date.
- PROPERTY link
Direct link to this object, empty if not published
- PROPERTY modificationdate
Modificationdate
- PROPERTY modifiedby
Modified by
- PROPERTY name
Name
- PROPERTY needstemplate
Whether this object needs a template
- PROPERTY ordering
Ordering number
- PROPERTY parent
Id of parent object of this file/folder
- PROPERTY parentobject
Parent object
- PROPERTY parentsite
Id of the parent site
- PROPERTY publish
Whether this file is published
- PROPERTY published
Current publish status number
- PROPERTY size
Size of the data of this file
- PROPERTY title
Title
- PROPERTY type
Id of the type of this whfs object
- PROPERTY typens
Namespace of the type of this whfs object
- PROPERTY whfspath
Full path whfs path
Functions
- OBJECT FUNCTION CopyTo(OBJECT destfolder, STRING newname)
Create a copy of this file/folder in the destination folder, with optional rename.
- MACRO DeleteSelf()
Deletes this file or folder
- RECORD FUNCTION FilterInstanceDataUpdates(STRING typenamespace, RECORD newdata)
Filters instancedata updates, cells with the same value as currently on disk will be removed
- STRING ARRAY FUNCTION GetEventMasks()
Returns the event masks for broadcasts fired for this object
- INTEGER ARRAY FUNCTION GetFullTree()
Get the tree from the publisher root to this object
- RECORD FUNCTION GetInstanceData(STRING typenamespace)
Returns the instance data for a specific whfs type
- RECORD FUNCTION GetInstanceDataByType(OBJECT type)
- STRING FUNCTION GetResourceName()
Return the resource name for the current object
- INTEGER ARRAY FUNCTION GetWHFSTree()
Get the tree from the publisher root to this object
- RECORD FUNCTION GetWrapped()
Get this file as a wrapped blob record
- BOOLEAN FUNCTION IsChildOf(INTEGER otherobj)
Returns whether this object is a child of another object
- BOOLEAN FUNCTION IsParentOf(INTEGER otherobj)
Returns whether this object is a parent of another object
- MACRO MoveTo(OBJECT destfolder, STRING newname)
Moves this file/folder to the destination folder, with optional rename.
- MACRO RecycleSelf()
Move this file or folder to the trash
- BOOLEAN FUNCTION Refresh()
Refresh all metadata from the database
- MACRO RestoreSelf()
Restores this file or folder from the recycle bin to its original location
- MACRO ScheduleRepublish()
Schedule a republish
- MACRO SetInstanceData(STRING typenamespace, RECORD newdata, RECORD options)
Sets the instance data for a specific WHFS type
- MACRO SetInstanceDataByType(OBJECT type, RECORD newdata, RECORD options)
- MACRO UpdateData(BLOB newdata)
Update the data of this file
- MACRO UpdateMetadata(RECORD newmetadata, RECORD options)
Update the metadata for this whfs object. Throws on invalid data.