Attach a local file to a Cordova Plugin

I am using the plugin in a native app (iOS & Android) that is created in NSBASIC/AppStudio and built using Voltbuilder. The plugin documentation describing how to attach a local file to an email is shown below. It is not clear to me what syntax I should use for each scenario within the the AppStudio Framework.

A clear explanation/example would be very helpful.
Thank you.

Attach files from the device storage
The path to the files must be defined absolute from the root of the file system. On Android the user has to allow the app first to read from external storage!{
    attachments: 'file:///storage/sdcard/icon.png', //=> storage/sdcard/icon.png (Android)

Attach native app resources
Each app has a resource folder, e.g. the res folder for Android apps or the Resource folder for iOS apps. The following example shows how to attach the app icon from within the app’s resource folder.{
    attachments: 'res://icon.png' //=> res/mipmap/icon (Android)

Attach assets from the www folder
The path to the files must be defined relative from the root of the mobile web app folder, which is located under the www folder.{
    attachments: [
        'file://img/logo.png', //=> assets/www/img/logo.png (Android)
        'file://css/index.css' //=> www/css/index.css (iOS)

Attach files from the internal app file system
The path must be defined relative from the directory holding application files.{
    attachments: [
        'app://databases/db.db3', //=> /data/data/<app.package>/databases/db.db3 (Android)
        'app://databases/db.db3', //=> /Applications/<>/databases/db.db3 (iOS, OSX)
        'app://databases/db.db3', //=> ms-appdata:///databases/db.db3 (Windows)

Tip : If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly.

This looks like straightforward JavaScript code. You can put it directly in your app.

Before writing a bunch of code you need to make sure this plugin will compile in your project. Voltbuilder is using AndroidX and this being an older plugin (originally forked from katzers email composer plugin) it probably won’t compile as the original which has much newer commits won’t compile.