add_folder(char* name);
add_resource(
char* content);
Adds a folder path
(similar to the PRAGMA_PATH statement) or a .WRS resource file content at runtime.
Parameters:
name - char* or STRING*, folder path.
content
- pointer to the content of a resource
file; or pointer to the path name of a resource file.
Remarks:
- Files for the media player, or DLL files can not be loaded from a
folder or resource path. However they can be contained in a resource and decompressed
at run time by file_cpy.
- add_resource
accepts a buffer with the content of a resource
file as argument. This way, resource files can be read by user functions or
wrapped together with the executable.
The user is responsible for freeing
the buffer at the end of the application.
-
Alternatively, add_resource
also accepts the name of a resource file in the work folder for re-opening it when it was removed with add_new.
-
A maximum of 32 folders and resources can be added. A7.08 All resource files in the work folder are added automatically
at start of the application.
- All added folders, resources, and buffers are removed through the add_new function.
Speed:
medium
Example:
add_folder("c:\\test");
...
char* buffer = file_load("test2.wrs",NULL,NULL);
add_resource(buffer);
...
free(buffer);
sys_exit(NULL);
See also:
PATH,
PRAGMA_PATH,
add_buffer, add_new
► latest
version online