PluginRequirements
ReferencesThe complete set of plugins a document relied on when it was saved, stored in the GHZ file so that opening it can establish what is missing before deserialisation quietly discards every object it cannot resolve.
This supersedes the Plugins.txt entry which earlier versions wrote and which nothing ever read.
Constructors
PluginRequirements
#Wrap a set of requirements.
Parameters:
| requirements (PluginRequirement[]) | Requirements to wrap. |
Fields
Properties
Empty
#Gets an empty set of requirements, which is what a file written before requirements existed amounts to.
Restorable
#Gets every missing requirement which the package server could plausibly supply. A missing core plugin is excluded, as that is a damaged installation rather than an absent download.
Methods
FromDocument
#Harvest the requirements of a document as it stands now, by asking the plugin server which plugin owns each object in it.
FromFile
#Read only the requirements out of a GHZ file, without deserialising the document inside it. This is what makes it affordable to check a file for missing plugins before deciding whether to open it at all.
Parameters:
| path (string) | File to inspect. |
Returns: The stored requirements, or an empty set when the file predates them or cannot be read.