The famous OS package in OScript is very important for the internal functionalities of the Content Server Modules, but its hardly documented. This post is an overview of the methods in this package.
A closer look
All of these methods van be used by adressing tzhe methods with the package name (OS) in any oscript program. For example OS.Features(Object) lists all features of the object in the argument.
Disclaimer: This list is not complete and may change any time and any Content Server Version, as long as there is no official documentation of this package. And there is (of course) no guarantee on this list by me.
Methods
CreateOSpace(sPath) | Object | Creates a new OSpace |
New(oParent) | Object | Creates a new OSpace object |
Delete(Object) | Deletes an OSpace object | |
NewTemp(MasterObject) | Creates a new instance of an OSpace object | |
IsTemp(Object) | Integer | Was the object created using newTemp. Result 0,1. |
Root(MasterObject) | Object | Returns the module root object |
Roots() | Array | Returns all loaded root objects |
Orphans(Object) | Array | Returns all orphans in the objects ospace |
Children(Object) | Array | Gets children objects from the object |
Patent(Object) | Object | Gets the parent object |
Name(Object), FileName(Object) | String | Returns the name of the object/ospace of the object |
ReadOnly(Object) | Boolean | Indicates, if the current ospace is locked |
Features(Object) | List | Lists all features in the current object |
IsFeature(Object, sFeatureName) | Boolean | Returns, if the Feature sFeatureName exists in Object |
AddFeature(Object, sFeatureName, [optional] CopyableBoolean) | Add a new feature to the object | |
DeleteFeature(Object, sFeatureName) | Removes the feature sFeatureName from the object | |
ClearValue(Object, sName) | Clears the content of the feature nName | |
IsObject(objRef) | Boolean | Checks, if the object still exists |
Happy OSpace Changing