The Resource Types facilitate access to resource files, offering these features:
- Access to Internet files via URL (fully qualified domain or relative addressing). These resources can be automatically cached locally and fully loaded in-memory for shared use.
- Access to resources stored in local storage.
- Ability to exchange resources dynamically across the Internet using UDP
- Customized plug-ins for deciphering or serializing the contents of specific types of resources.
- Type libraries that provide programmatic Acorn access to resource capabilities. Protection mechanisms help ensure web programs do not have unfettered write (or read) access to local files.
Working through Resource, some types implement various schemes (e.g., Http, File, and Udp) and others implement various ways to load resources (e.g., Png, Jpg, etc.).
API Documentation
Key scheme types:
- File manages locally stored resources. Initialize a file object with a pathname.
load(&size) returns a pointer to the loaded file in memory and the size of the loaded file.
Static functions are provided for folder manipulation as well, such as mkdirs, rmdirs, rm, mv, directory_exists, file_exists, ...
- HttpFile manages file resources retrieved from Internet servers, using a valid url. load(&size) returns a pointer to the loaded file in memory and the size of the loaded file.
Online Resources: