Resource Manager
From Yzis Wiki
A resource is anything that Yzis needs to load at runtime.
There is a good description of the resource mecanism in the api doc: YZResourceMgr.h
I am going to repeat part of the doc here.
There are different types of resource types:
- UserScriptResource: A script file run by user (eg: ":source " ).
- ConfigScriptResource: A script file run automatically by yzis (eg: hl.lua).
- IndentResource: A file managing indentation (script file).
- SyntaxHlResource: A file managing syntax highlighting (xml file).
- ConfigResource: A config file.
- WritableConfigResource: A config file writeable by yzis (yzisinfo, hl.lua)
Each resource is looked up in different directories, in the following order:
- current directories: only for UserScriptResource
- [User Home]/.yzis
- $YZISHOME
- [Installation Dir]/share/yzis
Some of the resources are looked up in specific subdirectories. Here an example of where you would be able to find files:
- UserScriptResource:
- ./some_file.lua
- ~/.yzis/scripts/some_file.lua
- $YZISHOME/scripts/some_file.lua
- [PREFIX]/share/yzis/scripts/some_file.lua
- ConfigScriptResource:
- ~/.yzis/scripts/some_file.lua
- $YZISHOME/scripts/some_file.lua
- [PREFIX]/share/yzis/scripts/some_file.lua
- IndentResource:
- ~/.yzis/indent/some_indent_file.lua
- $YZISHOME/indent/some_indent_file.lua
- [PREFIX]/share/yzis/indent/some_indent_file.lua
- SyntaxHlResource:
- ~/.yzis/syntax/some_indent_file.xml
- $YZISHOME/syntax/some_syntax_file.xml
- [PREFIX]/share/yzis/syntax/some_indent_file.xml
- ConfigResource:
- ~/.yzis/some_config_file
- $YZISHOME/some_config_file
- [PREFIX]/share/yzis/some_config_file
- WritableConfigResource:
- ~/.yzis/some_writeable_config_file
- $YZISHOME/some_writeable_config_file
- [PREFIX]/share/yzis/some_writeable_config_file
