Method

Xojo.IO.SpecialFolder.GetResource


Warning

This item was deprecated in version 2020r2. Please use SpecialFolder.Resource as a replacement.

Description

Gets the specified file (by name) located in the Resource folder of the app's main bundle (Mac or iOS) or in the Resource folder on Windows, Linux and console apps.

Notes

Use a Copy Files Build Step to copy files into the Resource folder.

Warning

An InvalidArgumentException will be raised if the file the does not exist.

Sample code

Gets a file that has been copied to the Resource folder:

Dim bundleFile As Xojo.IO.Folderitem
bundleFile = Xojo.IO.SpecialFolder.GetResource("AppDatabase.sqlite")

Compatibility

All project types on all supported operating systems.