VCV Rack API v2
rack::asset Namespace Reference

Handles common path locations. More...

Functions

PRIVATE void init ()
 
std::string system (std::string filename="")
 Returns the path of a system asset. More...
 
std::string user (std::string filename="")
 Returns the path of a user asset. More...
 
std::string plugin (plugin::Plugin *plugin, std::string filename="")
 Returns the path of an asset in the plugin's dir. More...
 

Variables

std::string systemDir
 
std::string userDir
 
std::string bundlePath
 

Detailed Description

Handles common path locations.

Function Documentation

◆ init()

PRIVATE void rack::asset::init ( )

◆ system()

std::string rack::asset::system ( std::string  filename = "")

Returns the path of a system asset.

Read-only files.

◆ user()

std::string rack::asset::user ( std::string  filename = "")

Returns the path of a user asset.

Readable/writable files.

◆ plugin()

std::string rack::asset::plugin ( plugin::Plugin plugin,
std::string  filename = "" 
)

Returns the path of an asset in the plugin's dir.

Read-only files.

Examples:

asset::plugin(pluginInstance, "samples/00.wav") // "/<Rack user dir>/plugins/MyPlugin/samples/00.wav"

Variable Documentation

◆ systemDir

std::string rack::asset::systemDir
extern

◆ userDir

std::string rack::asset::userDir
extern

◆ bundlePath

std::string rack::asset::bundlePath
extern