-
Notifications
You must be signed in to change notification settings - Fork 18
pyio.get_plugin_folder_path
Daniel Flassig edited this page Jul 7, 2026
·
1 revision
Returns a path handle to the plugin's own installation folder.
A plugin may ship read-only files (e.g. in a resource sub-folder) alongside its code. This function exposes the plugin folder so those files can be reached.
pyio.get_plugin_folder_path()
pyio.get_plugin_folder_path(rel_path)| Parameter | Type | Description |
|---|---|---|
rel_path |
string |
(Optional) A relative path below the plugin folder. Both \ and / are accepted as separators. .. components, invalid characters, and a leading separator are rejected. |
| Type | Description |
|---|---|
path handle |
A path handle to the destination file or folder. The path handle is read-only, but recursively listable. Without rel_path it refers to the plugin folder itself; with rel_path it refers to the addressed resource below it. |
local plugin_folder = pyio.get_plugin_folder_path()
local door = pyio.get_plugin_folder_path("resource/models/door.pyo")
pytha.import_pyo(door)When rel_path is given, the existence of the addressed file system object is checked immediately, so a missing resource is reported when the handle is requested rather than on first access.
The function will raise an error if
-
rel_pathis given but no file system object exists at the resulting path -
rel_pathuses a leading separator, a..component, or an invalid character
Minimum PYTHA Version: V26
pyio, Path Handles, pyio.append_path, pyio.list_folder, import_pyo