From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Xojo.IO.SpecialFolder.GetResource(name As Text) As Xojo.IO.FolderItem

Supported for all project types and targets.

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.


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

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")